diff options
author | Evan Prodromou <evan@controlezvous.ca> | 2008-06-23 23:24:08 -0400 |
---|---|---|
committer | Evan Prodromou <evan@controlezvous.ca> | 2008-06-23 23:24:08 -0400 |
commit | 25b9085efe2bc319d1cad6c2da4d19e15242c9cd (patch) | |
tree | 931fa08227ab165a7b534d5de5413b4841b96626 /lib | |
parent | d7731c9f2deb6caa7d5ffcc5ef57214aec49eebb (diff) |
change some things around to see if we can get the cookies right
darcs-hash:20080624032408-34904-1437e0359bd81c780e8ab12bdcbd1f9d8c87ef1c.gz
Diffstat (limited to 'lib')
-rw-r--r-- | lib/util.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/util.php b/lib/util.php index afbb7b7e8..5f184cce8 100644 --- a/lib/util.php +++ b/lib/util.php @@ -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; } |