summaryrefslogtreecommitdiff
path: root/includes/pages
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2017-01-02 00:09:18 +0100
committerGitHub <noreply@github.com>2017-01-02 00:09:18 +0100
commit29128763fd7f4b1f300fbc7014b9e6608c5d21a4 (patch)
tree76e495fb3d926df14609c746e08f69fee7134ed8 /includes/pages
parenta8ab9ccce10fb476dc480de40a49b513f5d505de (diff)
parent1f8d1eb4bbe9a764fa69a2da936db7adbfb2941e (diff)
Merge pull request #306 from MyIgel/config-fix-constant
Fixes "Constant already defined" notice
Diffstat (limited to 'includes/pages')
-rw-r--r--includes/pages/guest_login.php6
-rw-r--r--includes/pages/user_settings.php3
2 files changed, 5 insertions, 4 deletions
diff --git a/includes/pages/guest_login.php b/includes/pages/guest_login.php
index a4934be3..54abe5ca 100644
--- a/includes/pages/guest_login.php
+++ b/includes/pages/guest_login.php
@@ -14,7 +14,7 @@ function logout_title() {
// Engel registrieren
function guest_register() {
- global $tshirt_sizes, $enable_tshirt_size, $default_theme, $user;
+ global $tshirt_sizes, $enable_tshirt_size, $default_theme, $user, $min_password_length;
$event_config = EventConfig();
@@ -96,14 +96,14 @@ function guest_register() {
}
}
- if (isset($_REQUEST['password']) && strlen($_REQUEST['password']) >= MIN_PASSWORD_LENGTH) {
+ if (isset($_REQUEST['password']) && strlen($_REQUEST['password']) >= $min_password_length) {
if ($_REQUEST['password'] != $_REQUEST['password2']) {
$valid = false;
$msg .= error(_("Your passwords don't match."), true);
}
} else {
$valid = false;
- $msg .= error(sprintf(_("Your password is too short (please use at least %s characters)."), MIN_PASSWORD_LENGTH), true);
+ $msg .= error(sprintf(_("Your password is too short (please use at least %s characters)."), $min_password_length), true);
}
if (isset($_REQUEST['planned_arrival_date'])) {
diff --git a/includes/pages/user_settings.php b/includes/pages/user_settings.php
index a147b437..e776320f 100644
--- a/includes/pages/user_settings.php
+++ b/includes/pages/user_settings.php
@@ -88,9 +88,10 @@ function user_settings_main($user_source, $enable_tshirt_size, $tshirt_sizes) {
* The user
*/
function user_settings_password($user_source) {
+ global $min_password_length;
if (! isset($_REQUEST['password']) || ! verify_password($_REQUEST['password'], $user_source['Passwort'], $user_source['UID'])) {
error(_("-> not OK. Please try again."));
- } elseif (strlen($_REQUEST['new_password']) < MIN_PASSWORD_LENGTH) {
+ } elseif (strlen($_REQUEST['new_password']) < $min_password_length) {
error(_("Your password is to short (please use at least 6 characters)."));
} elseif ($_REQUEST['new_password'] != $_REQUEST['new_password2']) {
error(_("Your passwords don't match."));