aboutsummaryrefslogtreecommitdiffstats
path: root/identification.php
diff options
context:
space:
mode:
authornikrou <nikrou@piwigo.org>2006-07-28 09:34:27 +0000
committernikrou <nikrou@piwigo.org>2006-07-28 09:34:27 +0000
commit1873dbd0623cf61b95dedcbb0ee31bec416efd46 (patch)
treec74579a0827cab9d59414845edced3d66577fb44 /identification.php
parentf6c2f2b1b11f6369beaf88b53efbb8afa64e2ca7 (diff)
Fix bug 451: improvement
small problem with reconnexion after session timeout add auto-login function all staff for session (connexion, auto-login and logout) is now in include/user.inc.php git-svn-id: http://piwigo.org/svn/trunk@1511 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--identification.php21
1 files changed, 2 insertions, 19 deletions
diff --git a/identification.php b/identification.php
index 192511ac2..9bfdef96f 100644
--- a/identification.php
+++ b/identification.php
@@ -63,7 +63,7 @@ SELECT '.$conf['user_fields']['id'].' AS id,
{
$remember_me = true;
}
- log_user( $row['id'], $remember_me);
+ log_user($row['id'], $remember_me);
redirect(empty($redirect_to) ? make_index_url() : $redirect_to);
}
else
@@ -73,24 +73,7 @@ SELECT '.$conf['user_fields']['id'].' AS id,
}
elseif (!empty($_COOKIE[$conf['remember_me_name']]))
{
- $cookie = unserialize(pwg_stripslashes($_COOKIE[$conf['remember_me_name']]));
- $query = '
-SELECT auto_login_key
- FROM '.USERS_TABLE.'
- WHERE '.$conf['user_fields']['id'].' = '.$cookie['id'].'
-;';
-
- $auto_login_key = current(mysql_fetch_assoc(pwg_query($query)));
- if ($auto_login_key == $cookie['key'])
- {
- log_user($cookie['id'], false);
- redirect(empty($redirect_to) ? make_index_url() : $redirect_to);
- }
- else
- {
- setcookie($conf['remember_me_name'], '', 0, cookie_path());
- redirect(empty($redirect_to) ? make_index_url() : $redirect_to);
- }
+ auto_login();
}
//----------------------------------------------------- template initialization
//