[geeklog-cvs] geeklog-1.3/public_html/admin user.php,1.47,1.48

dhaun at geeklog.net dhaun at geeklog.net
Sun Feb 23 09:57:14 EST 2003


Update of /usr/cvs/geeklog/geeklog-1.3/public_html/admin
In directory internal.geeklog.net:/tmp/cvs-serv1180/public_html/admin

Modified Files:
	user.php 
Log Message:
Added support for new plugin functions plugin_user_create_<pluginname> and plugin_user_delete_<pluginname> to help plugins manage additional user-related tables (e.g. extended user information).


Index: user.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/admin/user.php,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** user.php	7 Feb 2003 15:51:49 -0000	1.47
--- user.php	23 Feb 2003 14:57:12 -0000	1.48
***************
*** 5,17 ****
  // | Geeklog 1.3                                                               |
  // +---------------------------------------------------------------------------+
! // | lib-user.php                                                              |
  // | Geeklog user administration page.                                         |
  // |                                                                           |
  // +---------------------------------------------------------------------------+
! // | Copyright (C) 2000,2001 by the following authors:                         |
  // |                                                                           |
! // | Authors: Tony Bibbs       - tony at tonybibbs.com                            |
! // |          Mark Limburg     - mlimburg at users.sourceforge.net                |
! // |          Jason Wittenburg - jwhitten at securitygeeks.com                    |
  // +---------------------------------------------------------------------------+
  // |                                                                           |
--- 5,18 ----
  // | Geeklog 1.3                                                               |
  // +---------------------------------------------------------------------------+
! // | user.php                                                                  |
  // | Geeklog user administration page.                                         |
  // |                                                                           |
  // +---------------------------------------------------------------------------+
! // | Copyright (C) 2000-2003 by the following authors:                         |
  // |                                                                           |
! // | Authors: Tony Bibbs        - tony at tonybibbs.com                           |
! // |          Mark Limburg      - mlimburg at users.sourceforge.net               |
! // |          Jason Whittenburg - jwhitten at securitygeeks.com                   |
! // |          Dirk Haun         - dirk at haun-online.de                          |
  // +---------------------------------------------------------------------------+
  // |                                                                           |
***************
*** 212,216 ****
              $passwd = DB_getItem($_TABLES['users'],'passwd',"uid = $uid");
  		}
!         
          if (DB_count($_TABLES['users'],'uid',$uid) == 0) {
              DB_query("INSERT INTO {$_TABLES['users']} (uid,username,fullname,passwd,email,regdate,homepage) VALUES($uid,'$username','$fullname','$passwd', '$email','$regdate','$homepage')");
--- 213,217 ----
              $passwd = DB_getItem($_TABLES['users'],'passwd',"uid = $uid");
  		}
! 
          if (DB_count($_TABLES['users'],'uid',$uid) == 0) {
              DB_query("INSERT INTO {$_TABLES['users']} (uid,username,fullname,passwd,email,regdate,homepage) VALUES($uid,'$username','$fullname','$passwd', '$email','$regdate','$homepage')");
***************
*** 223,226 ****
--- 224,229 ----
              DB_query("INSERT INTO {$_TABLES['usercomment']} (uid) VALUES ($uid)");
              DB_query("INSERT INTO {$_TABLES['userinfo']} (uid) VALUES ($uid)");
+ 
+             PLG_createUser ($uid);
          } else {
              $curphoto = DB_getItem($_TABLES['users'],'photo',"uid = $uid");
***************
*** 411,415 ****
          
          if ($verbose_import) {
!             $retval .="<BR><B>Working on username=$u_name, fullname=$full_name, and email=$email</B><BR>\n";
              COM_errorLog("Working on username=$u_name, fullname=$full_name, and email=$email",1);
          }
--- 414,418 ----
          
          if ($verbose_import) {
!             $retval .="<br><b>Working on username=$u_name, fullname=$full_name, and email=$email</b><br>\n";
              COM_errorLog("Working on username=$u_name, fullname=$full_name, and email=$email",1);
          }
***************
*** 436,442 ****
                  DB_query("INSERT INTO {$_TABLES['userinfo']} (uid) VALUES ($uid)");
                  $retval .= emailpassword($u_name, 1);
!                 
                  if ($verbose_import) {
!                     $retval .= "<BR> Account for <B>$u_name</B> created successfully.<BR>\n";
                      COM_errorLog("Account for $u_name created successfully",1);
                  }
--- 439,447 ----
                  DB_query("INSERT INTO {$_TABLES['userinfo']} (uid) VALUES ($uid)");
                  $retval .= emailpassword($u_name, 1);
! 
!                 PLG_createUser ($uid);
! 
                  if ($verbose_import) {
!                     $retval .= "<br> Account for <b>$u_name</b> created successfully.<br>\n";
                      COM_errorLog("Account for $u_name created successfully",1);
                  }
***************
*** 444,448 ****
              } else {
                  if ($verbose_import) {
!                     $retval .= "<BR><B>$email</B> is not a valid email address, account not created<BR>\n"; // malformed email
                      COM_errorLog("$email is not a valid email address, account not created",1);
                  }
--- 449,453 ----
              } else {
                  if ($verbose_import) {
!                     $retval .= "<br><b>$email</b> is not a valid email address, account not created<br>\n"; // malformed email
                      COM_errorLog("$email is not a valid email address, account not created",1);
                  }
***************
*** 451,455 ****
          } else {
              if ($verbose_import) {
!                 $retval .= "<BR><B>$u_name</B> already exists, account not created.<BR>\n"; // users already exists
                  COM_errorLog("$u_name,$email: username or email already exists, account not created",1);
              }
--- 456,460 ----
          } else {
              if ($verbose_import) {
!                 $retval .= "<br><b>$u_name</b> already exists, account not created.<br>\n"; // users already exists
                  COM_errorLog("$u_name,$email: username or email already exists, account not created",1);
              }
***************
*** 539,542 ****
--- 544,549 ----
              custom_userdelete($uid);
  	    } 
+ 
+         PLG_deleteUser ($uid);
  		
          // what to do with orphan stories/comments?





More information about the geeklog-cvs mailing list