[geeklog-cvs] Geeklog-1.x/public_html/admin user.php,1.200,1.201
Dirk Haun
dhaun at qs1489.pair.com
Sun Feb 24 14:43:55 EST 2008
Update of /cvsroot/geeklog/Geeklog-1.x/public_html/admin
In directory qs1489.pair.com:/tmp/cvs-serv46118/public_html/admin
Modified Files:
user.php
Log Message:
Ease restriction that email addresses have to be unique to make handling of remote / OpenID accounts easier
Index: user.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/admin/user.php,v
retrieving revision 1.200
retrieving revision 1.201
diff -C2 -d -r1.200 -r1.201
*** user.php 20 Feb 2008 20:07:58 -0000 1.200
--- user.php 24 Feb 2008 19:43:53 -0000 1.201
***************
*** 9,13 ****
// | Geeklog user administration page. |
// +---------------------------------------------------------------------------+
! // | Copyright (C) 2000-2007 by the following authors: |
// | |
// | Authors: Tony Bibbs - tony AT tonybibbs DOT com |
--- 9,13 ----
// | Geeklog user administration page. |
// +---------------------------------------------------------------------------+
! // | Copyright (C) 2000-2008 by the following authors: |
// | |
// | Authors: Tony Bibbs - tony AT tonybibbs DOT com |
***************
*** 470,474 ****
} else {
$ucount = DB_getItem ($_TABLES['users'], 'COUNT(*)',
! "username = '$uname' AND uid <> $uid AND (remoteservice = '' OR remoteservice is null)");
}
}
--- 470,474 ----
} else {
$ucount = DB_getItem ($_TABLES['users'], 'COUNT(*)',
! "username = '$uname' AND uid <> $uid AND (remoteservice = '' OR remoteservice IS NULL)");
}
}
***************
*** 478,492 ****
}
! $emailaddr = addslashes ($email);
! if (empty ($uid)) {
! $ucount = DB_getItem ($_TABLES['users'], 'COUNT(*)',
! "email = '$emailaddr'");
} else {
! $ucount = DB_getItem ($_TABLES['users'], 'COUNT(*)',
! "email = '$emailaddr' AND uid <> $uid");
}
if ($ucount > 0) {
// Admin just changed a user's email to one that already exists
! return edituser ($uid, 56);
}
--- 478,500 ----
}
! $emailaddr = addslashes($email);
! $exclude_remote = " AND (remoteservice IS NULL OR remoteservice = '')";
! if (empty($uid)) {
! $ucount = DB_getItem($_TABLES['users'], 'COUNT(*)',
! "email = '$emailaddr'" . $exclude_remote);
} else {
! $old_email = DB_getItem($_TABLES['users'], 'email', "uid = '$uid'");
! if ($old_email == $email) {
! // email address didn't change so don't care
! $ucount = 0;
! } else {
! $ucount = DB_getItem($_TABLES['users'], 'COUNT(*)',
! "email = '$emailaddr' AND uid <> $uid"
! . $exclude_remote);
! }
}
if ($ucount > 0) {
// Admin just changed a user's email to one that already exists
! return edituser($uid, 56);
}
More information about the geeklog-cvs
mailing list