[geeklog-cvs] geeklog-1.3/public_html users.php,1.78,1.79
dhaun at iowaoutdoors.org
dhaun at iowaoutdoors.org
Sat May 15 09:02:23 EDT 2004
Update of /var/cvs/geeklog-1.3/public_html
In directory www:/tmp/cvs-serv25753/public_html
Modified Files:
users.php
Log Message:
Moved code to send the registration email to lib-user.php, thus avoiding having the same piece of code in users.php, admin/user.php and admin/moderation.php.
Also fixed sending of the registration email when batch-adding users.
Index: users.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/users.php,v
retrieving revision 1.78
retrieving revision 1.79
diff -C2 -d -r1.78 -r1.79
*** users.php 10 May 2004 18:20:40 -0000 1.78
--- users.php 15 May 2004 13:02:20 -0000 1.79
***************
*** 47,51 ****
* Geeklog common function library
*/
! require_once('lib-common.php');
$VERBOSE = false;
--- 47,52 ----
* Geeklog common function library
*/
! require_once ('lib-common.php');
! require_once ($_CONF['path_system'] . 'lib-user.php');
$VERBOSE = false;
***************
*** 294,315 ****
$A = DB_fetchArray($result);
if (($_CONF['usersubmission'] == 1) && ($A['passwd'] == md5(''))) {
! return COM_refresh ("{$_CONF['site_url']}/index.php?msg=48");
}
- srand((double)microtime()*1000000);
- $passwd = rand();
- $passwd = md5($passwd);
- $passwd = substr($passwd,1,8);
- $passwd2 = md5($passwd);
- DB_change($_TABLES['users'],'passwd',"$passwd2",'username',$username);
- DB_change($_TABLES['users'],'pwrequestid',"NULL",'username',$username);
- $mailtext = "{$LANG04[15]}\n\n";
- $mailtext .= "{$LANG04[2]}: $username\n";
- $mailtext .= "{$LANG04[4]}: $passwd\n\n";
- $mailtext .= "{$LANG04[14]}\n\n";
- $mailtext .= "{$_CONF["site_name"]}\n";
- $mailtext .= "{$_CONF['site_url']}\n";
! $subject = $_CONF['site_name'] . ': ' . $LANG04[16];
! COM_mail ($A['email'], $subject, $mailtext);
if ($msg) {
--- 295,302 ----
$A = DB_fetchArray($result);
if (($_CONF['usersubmission'] == 1) && ($A['passwd'] == md5(''))) {
! return COM_refresh ($_CONF['site_url'] . '/index.php?msg=48');
}
! USER_createAndSendPassword ($username, $A['email']);
if ($msg) {
More information about the geeklog-cvs
mailing list