Upon login we should touch their user_list row to update the 'stamp'

column.
This commit is contained in:
Chris Morgan
2004-11-17 23:01:12 +00:00
committed by Jeremy Newman
parent 0783233289
commit 91a821fdde

View File

@@ -101,10 +101,16 @@ class User {
{
$result = $this->restore($username, $password);
/* if our result is non-null then we must have had an error */
if($result != null)
return $result;
//echo "<br>LOGIN($this->username)<br>\n";
//FIXME: update last_login here
/* update the 'stamp' field in the users account to reflect the last time */
/* they logged in */
$myUserId = $this->lookup_userid($username);
$result = mysql_query("UPDATE user_list SET stamp=null WHERE userid=$myUserId;");
return 0;
}
@@ -193,7 +199,6 @@ class User {
$result = mysql_query("DELETE FROM user_prefs WHERE userid = $this->userid AND name = '$key'");
$result = mysql_query("INSERT INTO user_prefs VALUES($this->userid, '$key', '$value')");
echo mysql_error();
return $result ? true : false;
}
@@ -262,7 +267,6 @@ class User {
return 1; // OK
return 0; // NOPE!
}
}