[geeklog-cvs] geeklog-1.3/public_html/admin user.php,1.55,1.56
geeklog-cvs-admin at lists.geeklog.net
geeklog-cvs-admin at lists.geeklog.net
Sun Jun 22 06:19:17 EDT 2003
Update of /usr/cvs/geeklog/geeklog-1.3/public_html/admin
In directory internal.geeklog.net:/tmp/cvs-serv11476
Modified Files:
user.php
Log Message:
Bugfix: When a new user is created, make sure s/he gets a password (even if the Admin didn't enter one) - but only if this is really a new account.
Index: user.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/admin/user.php,v
retrieving revision 1.55
retrieving revision 1.56
diff -C2 -d -r1.55 -r1.56
*** user.php 20 Jun 2003 21:30:56 -0000 1.55
--- user.php 22 Jun 2003 10:19:15 -0000 1.56
***************
*** 220,223 ****
--- 220,226 ----
} else {
$passwd = DB_getItem($_TABLES['users'],'passwd',"uid = $uid");
+ }
+
+ if (DB_count($_TABLES['users'],'uid',$uid) == 0) {
if (empty ($password)) {
// no password? create one ...
***************
*** 228,234 ****
$passwd = md5 ($passwd);
}
- }
-
- 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')");
DB_query("INSERT INTO {$_TABLES['userprefs']} (uid) VALUES ($uid)");
--- 231,234 ----
More information about the geeklog-cvs
mailing list