aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2006-11-06 22:55:38 +0000
committerplegall <plg@piwigo.org>2006-11-06 22:55:38 +0000
commite4606c00b04bb58e18fdf744567d1d329658719d (patch)
tree498b6d9b4965e72ea37a3d0c9735075b5e37bd16 /include
parent967f476b6bb6c3126753045b40a802d40995d647 (diff)
Bug fixed: #users.auto_login_key moved to #user_infos.auto_login_key because
table users does not contain information specificaly related to PhpWebGallery. With auto_login_key field in #users, external authentication won't work. Warning: when updating with subversion, you'll have to go directly to upgrade_feed.php git-svn-id: http://piwigo.org/svn/branches/branch-1_6@1594 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include')
-rw-r--r--include/functions_user.inc.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php
index 0a3991574..d59fed3ab 100644
--- a/include/functions_user.inc.php
+++ b/include/functions_user.inc.php
@@ -605,8 +605,8 @@ function log_user($user_id, $remember_me)
// search for an existing auto_login_key
$query = '
SELECT auto_login_key
- FROM '.USERS_TABLE.'
- WHERE '.$conf['user_fields']['id'].' = '.$user_id.'
+ FROM '.USER_INFOS_TABLE.'
+ WHERE user_id = '.$user_id.'
;';
$auto_login_key = current(mysql_fetch_assoc(pwg_query($query)));
@@ -614,9 +614,9 @@ SELECT auto_login_key
{
$auto_login_key = base64_encode(md5(uniqid(rand(), true)));
$query = '
-UPDATE '.USERS_TABLE.'
- SET auto_login_key=\''.$auto_login_key.'\'
- WHERE '.$conf['user_fields']['id'].' = '.$user_id.'
+UPDATE '.USER_INFOS_TABLE.'
+ SET auto_login_key = \''.$auto_login_key.'\'
+ WHERE user_id = '.$user_id.'
;';
pwg_query($query);
}
@@ -658,8 +658,8 @@ function auto_login() {
$query = '
SELECT auto_login_key
- FROM '.USERS_TABLE.'
- WHERE '.$conf['user_fields']['id'].' = '.$cookie['id'].'
+ FROM '.USER_INFOS_TABLE.'
+ WHERE user_id = '.$cookie['id'].'
;';
$auto_login_key = current(mysql_fetch_assoc(pwg_query($query)));