set user takes a nickname, not a user object

darcs-hash:20080624032818-34904-bf8c5594c42c797820e080250c955645a5a84aa1.gz
This commit is contained in:
Evan Prodromou 2008-06-23 23:28:18 -04:00
parent 25b9085efe
commit fcd473a1a3

View File

@ -451,7 +451,6 @@ define('REMEMBERME', 'rememberme');
define('REMEMBERME_EXPIRY', 30 * 24 * 60 * 60); define('REMEMBERME_EXPIRY', 30 * 24 * 60 * 60);
function common_rememberme() { function common_rememberme() {
common_debug('rememberme called', __FILE__);
$user = common_current_user(); $user = common_current_user();
if (!$user) { if (!$user) {
return false; return false;
@ -486,7 +485,7 @@ function common_remembered_user() {
common_log_db_error($rm, 'DELETE', __FILE__); common_log_db_error($rm, 'DELETE', __FILE__);
$user = NULL; $user = NULL;
} else { } else {
common_set_user($user); common_set_user($user->nickname);
common_real_login(false); common_real_login(false);
# We issue a new cookie, so they can log in # We issue a new cookie, so they can log in
# automatically again after this session # automatically again after this session