Better fix for the password expiration problem

This commit is contained in:
james 2008-07-09 14:51:48 +00:00
parent 0f2812cc90
commit 5ed0135442

View File

@ -233,6 +233,7 @@ function user_save($u)
$data = mysql_escape_string(stripslashes($u[$f])); $data = mysql_escape_string(stripslashes($u[$f]));
$set .= "$f='$data'"; $set .= "$f='$data'";
if($f=="password") $set.=",passwordset=NOW()";
} }
//echo "<pre>"; //echo "<pre>";
//print_r($u); //print_r($u);
@ -338,7 +339,7 @@ function user_create($type, $u = NULL)
{ {
if(!is_array($u)) { if(!is_array($u)) {
mysql_query("INSERT INTO users (`types`,`passwordset`,`created`) mysql_query("INSERT INTO users (`types`,`passwordset`,`created`)
VALUES ('$type', NOW(), NOW())"); VALUES ('$type', '0000-00-00', NOW())");
$uid = mysql_insert_id(); $uid = mysql_insert_id();
} else { } else {
/* The user has been specified and already exists, /* The user has been specified and already exists,