summaryrefslogtreecommitdiffstats
path: root/inc/user.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2013-10-31 12:38:25 +0100
committerSimon Rettberg2013-10-31 12:38:25 +0100
commita362ac12b119b49519f5af51b92ebb7d6e127b87 (patch)
treea2334426c8af99f864e2dd90c2f275e3ed50083a /inc/user.inc.php
parentRemodel zeug mit settings und so (diff)
downloadslx-admin-a362ac12b119b49519f5af51b92ebb7d6e127b87.tar.gz
slx-admin-a362ac12b119b49519f5af51b92ebb7d6e127b87.tar.xz
slx-admin-a362ac12b119b49519f5af51b92ebb7d6e127b87.zip
Comments, minor refactoring, possiblity to validate configuration parameters
Diffstat (limited to 'inc/user.inc.php')
-rw-r--r--inc/user.inc.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/inc/user.inc.php b/inc/user.inc.php
index 38e57e33..b333c7e4 100644
--- a/inc/user.inc.php
+++ b/inc/user.inc.php
@@ -39,7 +39,7 @@ class User
{
$ret = Database::queryFirst('SELECT userid, passwd FROM user WHERE login = :user LIMIT 1', array(':user' => $user));
if ($ret === false) return false;
- if (crypt($pass, $ret['passwd']) !== $ret['passwd']) return false;
+ if (!Crypto::verify($pass, $ret['passwd'])) return false;
Session::create();
Session::set('uid', $ret['userid']);
Session::set('token', md5(rand() . time() . rand() . $_SERVER['REMOTE_ADDR'] . rand() . $_SERVER['REMOTE_PORT'] . rand() . $_SERVER['HTTP_USER_AGENT']));