summaryrefslogtreecommitdiff
path: root/includes/controller/users_controller.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2016-09-29 12:08:12 +0200
committermsquare <msquare@notrademark.de>2016-09-29 12:08:12 +0200
commitf05f1a3cd4cc3a9fa6021d2c5feedd7e734973ba (patch)
treed1c2404dc56f6d1d0a3ed402d0a3880e77b70a17 /includes/controller/users_controller.php
parent81e5a6482c340d3013c9fce54c10ef1a72a5a930 (diff)
rename to
Diffstat (limited to 'includes/controller/users_controller.php')
-rw-r--r--includes/controller/users_controller.php30
1 files changed, 15 insertions, 15 deletions
diff --git a/includes/controller/users_controller.php b/includes/controller/users_controller.php
index 512a5723..ca1b8c8d 100644
--- a/includes/controller/users_controller.php
+++ b/includes/controller/users_controller.php
@@ -52,14 +52,14 @@ function user_delete_controller() {
}
if (isset($_REQUEST['submit'])) {
- $ok = true;
+ $valid = true;
if (! (isset($_REQUEST['password']) && verify_password($_REQUEST['password'], $user['Passwort'], $user['UID']))) {
- $ok = false;
+ $valid = false;
error(_("Your password is incorrect. Please try it again."));
}
- if ($ok) {
+ if ($valid) {
$result = User_delete($user_source['UID']);
if ($result === false) {
engelsystem_error('Unable to delete user.');
@@ -109,16 +109,16 @@ function user_edit_vouchers_controller() {
}
if (isset($_REQUEST['submit'])) {
- $ok = true;
+ $valid = true;
if (isset($_REQUEST['vouchers']) && test_request_int('vouchers') && trim($_REQUEST['vouchers']) >= 0) {
$vouchers = trim($_REQUEST['vouchers']);
} else {
- $ok = false;
+ $valid = false;
error(_("Please enter a valid number of vouchers."));
}
- if ($ok) {
+ if ($valid) {
$user_source['got_voucher'] = $vouchers;
$result = User_update($user_source);
@@ -225,19 +225,19 @@ function user_password_recovery_controller() {
}
if (isset($_REQUEST['submit'])) {
- $ok = true;
+ $valid = true;
if (isset($_REQUEST['password']) && strlen($_REQUEST['password']) >= MIN_PASSWORD_LENGTH) {
if ($_REQUEST['password'] != $_REQUEST['password2']) {
- $ok = false;
+ $valid = false;
error(_("Your passwords don't match."));
}
} else {
- $ok = false;
+ $valid = false;
error(_("Your password is to short (please use at least 6 characters)."));
}
- if ($ok) {
+ if ($valid) {
$result = set_password($user_source['UID'], $_REQUEST['password']);
if ($result === false) {
engelsystem_error(_("Password could not be updated."));
@@ -251,7 +251,7 @@ function user_password_recovery_controller() {
return User_password_set_view();
} else {
if (isset($_REQUEST['submit'])) {
- $ok = true;
+ $valid = true;
if (isset($_REQUEST['email']) && strlen(strip_request_item('email')) > 0) {
$email = strip_request_item('email');
@@ -261,19 +261,19 @@ function user_password_recovery_controller() {
engelsystem_error("Unable to load user.");
}
if ($user_source == null) {
- $ok = false;
+ $valid = false;
error(_("E-mail address is not correct."));
}
} else {
- $ok = false;
+ $valid = false;
error(_("E-mail address is not correct."));
}
} else {
- $ok = false;
+ $valid = false;
error(_("Please enter your e-mail."));
}
- if ($ok) {
+ if ($valid) {
$token = User_generate_password_recovery_token($user_source);
if ($token === false) {
engelsystem_error("Unable to generate password recovery token.");