]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
change some things around to see if we can get the cookies right
authorEvan Prodromou <evan@controlezvous.ca>
Tue, 24 Jun 2008 03:24:08 +0000 (23:24 -0400)
committerEvan Prodromou <evan@controlezvous.ca>
Tue, 24 Jun 2008 03:24:08 +0000 (23:24 -0400)
darcs-hash:20080624032408-34904-1437e0359bd81c780e8ab12bdcbd1f9d8c87ef1c.gz

lib/util.php

index afbb7b7e861e9b5dfd28c2029dec0617f596b869..5f184cce882d0e11ea1b44d1b341787870deb7c2 100644 (file)
@@ -448,9 +448,10 @@ function common_set_cookie($key, $value, $expiration=0) {
 }
 
 define('REMEMBERME', 'rememberme');
-define('REMEMBERME_EXPIRY', round(30 * 24 * 60 * 60));
+define('REMEMBERME_EXPIRY', 30 * 24 * 60 * 60);
 
 function common_rememberme() {
+       common_debug('rememberme called', __FILE__);
        $user = common_current_user();
        if (!$user) {
                return false;
@@ -458,7 +459,8 @@ function common_rememberme() {
        $rm = new Remember_me();
        $rm->code = common_good_rand(16);
        $rm->user_id = $user->id;
-       if (!$rm->insert()) {
+       $result = $rm->insert();
+       if (!$result) {
                common_log_db_error($rm, 'INSERT', __FILE__);
                return false;
        }