more debug output for rememberme cookies

darcs-hash:20080708064241-84dde-6c72e4e5d5ec5675bdef027e1b241f0555ce8dd1.gz
This commit is contained in:
Evan Prodromou 2008-07-08 02:42:41 -04:00
parent ebd9adca69
commit 31db4cd94e
3 changed files with 4 additions and 1 deletions

View File

@ -45,7 +45,7 @@ class LoginAction extends Action {
} }
common_real_login(true); common_real_login(true);
if ($this->boolean('rememberme')) { if ($this->boolean('rememberme')) {
common_debug('Adding rememberme cookie'); common_debug('Adding rememberme cookie for ' . $nickname);
common_rememberme(); common_rememberme();
} }
# success! # success!

View File

@ -71,6 +71,7 @@ class RegisterAction extends Action {
} }
common_real_login(true); common_real_login(true);
if ($this->boolean('rememberme')) { if ($this->boolean('rememberme')) {
common_debug('Adding rememberme cookie for ' . $nickname);
common_rememberme(); common_rememberme();
} }
common_redirect(common_local_url('profilesettings')); common_redirect(common_local_url('profilesettings'));

View File

@ -481,6 +481,7 @@ function common_rememberme() {
common_log_db_error($rm, 'INSERT', __FILE__); common_log_db_error($rm, 'INSERT', __FILE__);
return false; return false;
} }
common_log(LOG_INFO, 'adding rememberme cookie for ' . $user->nickname);
common_set_cookie(REMEMBERME, common_set_cookie(REMEMBERME,
implode(':', array($rm->user_id, $rm->code)), implode(':', array($rm->user_id, $rm->code)),
time() + REMEMBERME_EXPIRY); time() + REMEMBERME_EXPIRY);
@ -504,6 +505,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_log(LOG_INFO, 'logging in ' . $user->nickname . ' using rememberme code ' . $rm->code);
common_set_user($user->nickname); 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