]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
more debug output for rememberme cookies
authorEvan Prodromou <evan@prodromou.name>
Tue, 8 Jul 2008 06:42:41 +0000 (02:42 -0400)
committerEvan Prodromou <evan@prodromou.name>
Tue, 8 Jul 2008 06:42:41 +0000 (02:42 -0400)
darcs-hash:20080708064241-84dde-6c72e4e5d5ec5675bdef027e1b241f0555ce8dd1.gz

actions/login.php
actions/register.php
lib/util.php

index a4e8b33cd9e1b062d2b2f013fa11a6b2ab861019..93661973287bc5ef74e8f7d8240a3de1e55afb3f 100644 (file)
@@ -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!
index 06ad858997fd5fee67baf561621aac702bb14d62..a8b360f730c5510492fc5b7ed87526b2c90924b1 100644 (file)
@@ -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'));
index 8984c1c82c52d631464d6da749e35720ac148222..60242eaf71ce268af12523dc464a99f6801e9e44 100644 (file)
@@ -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