diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2017-08-29 23:06:46 +0200 |
---|---|---|
committer | Igor Scheller <igor.scheller@igorshp.de> | 2017-08-29 23:16:41 +0200 |
commit | d0074cf0069322fe175fb385b91c974fc2771547 (patch) | |
tree | 713fcb1f426c8a693938e3c8bbfc685e57f79e69 /includes/sys_auth.php | |
parent | 50da458d8907cc7c05938565faa80b271bbf9b3d (diff) | |
parent | 581b81f1b25dc6b6f0a3b34810c293738fd40217 (diff) |
Merge remote-tracking branch 'engelsystem/feature-igel-rewrite'
# Conflicts:
# includes/controller/angeltypes_controller.php
# includes/pages/admin_groups.php
# includes/pages/user_settings.php
# includes/sys_page.php
# src/Exceptions/Handler.php
# src/Http/Request.php
Diffstat (limited to 'includes/sys_auth.php')
-rw-r--r-- | includes/sys_auth.php | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/includes/sys_auth.php b/includes/sys_auth.php index 607d180b..36f0f935 100644 --- a/includes/sys_auth.php +++ b/includes/sys_auth.php @@ -11,10 +11,9 @@ function load_auth() $user = null; if (isset($_SESSION['uid'])) { - $user = DB::select('SELECT * FROM `User` WHERE `UID`=? LIMIT 1', [$_SESSION['uid']]); - if (count($user) > 0) { + $user = DB::selectOne('SELECT * FROM `User` WHERE `UID`=? LIMIT 1', [$_SESSION['uid']]); + if (!empty($user)) { // User ist eingeloggt, Datensatz zur Verfügung stellen und Timestamp updaten - $user = array_shift($user); DB::update(' UPDATE `User` SET `lastLogIn` = ? @@ -55,11 +54,10 @@ function generate_salt($length = 16) * * @param int $uid * @param string $password - * @return bool */ function set_password($uid, $password) { - $result = DB::update(' + DB::update(' UPDATE `User` SET `Passwort` = ?, `password_recovery_token`=NULL @@ -71,10 +69,6 @@ function set_password($uid, $password) $uid ] ); - if (DB::getStm()->errorCode() != '00000') { - engelsystem_error('Unable to update password.'); - } - return $result; } /** |