summaryrefslogtreecommitdiff
path: root/includes/model/User_model.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/model/User_model.php')
-rw-r--r--includes/model/User_model.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/model/User_model.php b/includes/model/User_model.php
index c3e91911..f58c5d18 100644
--- a/includes/model/User_model.php
+++ b/includes/model/User_model.php
@@ -313,7 +313,7 @@ function User_by_api_key($api_key) {
function User_by_email($email) {
$user = sql_select("SELECT * FROM `User` WHERE `email`='" . sql_escape($email) . "' LIMIT 1");
if ($user === false) {
- return false;
+ engelsystem_error("Unable to load user.");
}
if (count($user) == 0) {
return null;
@@ -330,7 +330,7 @@ function User_by_email($email) {
function User_by_password_recovery_token($token) {
$user = sql_select("SELECT * FROM `User` WHERE `password_recovery_token`='" . sql_escape($token) . "' LIMIT 1");
if ($user === false) {
- return false;
+ engelsystem_error("Unable to load user.");
}
if (count($user) == 0) {
return null;
@@ -363,7 +363,7 @@ function User_generate_password_recovery_token(&$user) {
$user['password_recovery_token'] = md5($user['Nick'] . time() . rand());
$result = sql_query("UPDATE `User` SET `password_recovery_token`='" . sql_escape($user['password_recovery_token']) . "' WHERE `UID`='" . sql_escape($user['UID']) . "' LIMIT 1");
if ($result === false) {
- return false;
+ engelsystem_error("Unable to generate password recovery token.");
}
engelsystem_log("Password recovery for " . User_Nick_render($user) . " started.");
return $user['password_recovery_token'];