From 31db4cd94e8afd6e0a59d17253b1db6ebb765900 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 8 Jul 2008 02:42:41 -0400 Subject: [PATCH] more debug output for rememberme cookies darcs-hash:20080708064241-84dde-6c72e4e5d5ec5675bdef027e1b241f0555ce8dd1.gz --- actions/login.php | 2 +- actions/register.php | 1 + lib/util.php | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/actions/login.php b/actions/login.php index a4e8b33cd9..9366197328 100644 --- a/actions/login.php +++ b/actions/login.php @@ -45,7 +45,7 @@ class LoginAction extends Action { } common_real_login(true); if ($this->boolean('rememberme')) { - common_debug('Adding rememberme cookie'); + common_debug('Adding rememberme cookie for ' . $nickname); common_rememberme(); } # success! diff --git a/actions/register.php b/actions/register.php index 06ad858997..a8b360f730 100644 --- a/actions/register.php +++ b/actions/register.php @@ -71,6 +71,7 @@ class RegisterAction extends Action { } common_real_login(true); if ($this->boolean('rememberme')) { + common_debug('Adding rememberme cookie for ' . $nickname); common_rememberme(); } common_redirect(common_local_url('profilesettings')); diff --git a/lib/util.php b/lib/util.php index 8984c1c82c..60242eaf71 100644 --- a/lib/util.php +++ b/lib/util.php @@ -481,6 +481,7 @@ function common_rememberme() { common_log_db_error($rm, 'INSERT', __FILE__); return false; } + common_log(LOG_INFO, 'adding rememberme cookie for ' . $user->nickname); common_set_cookie(REMEMBERME, implode(':', array($rm->user_id, $rm->code)), time() + REMEMBERME_EXPIRY); @@ -504,6 +505,7 @@ function common_remembered_user() { common_log_db_error($rm, 'DELETE', __FILE__); $user = NULL; } else { + common_log(LOG_INFO, 'logging in ' . $user->nickname . ' using rememberme code ' . $rm->code); common_set_user($user->nickname); common_real_login(false); # We issue a new cookie, so they can log in -- 2.39.5