aboutsummaryrefslogtreecommitdiff
path: root/install/ElggInstaller.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-10-10 17:18:16 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-10-10 17:18:16 +0000
commit38cf151563563dd8f5fe8b5dbcda1d800997d9f6 (patch)
tree2b6992e05951e134f9f655479a2fad78f89de9f3 /install/ElggInstaller.php
parent29b4b91a9a220bd462eab6320cf16a2ddf4be112 (diff)
downloadelgg-38cf151563563dd8f5fe8b5dbcda1d800997d9f6.tar.gz
elgg-38cf151563563dd8f5fe8b5dbcda1d800997d9f6.tar.bz2
using config variable for minimum password length
git-svn-id: http://code.elgg.org/elgg/trunk@7047 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'install/ElggInstaller.php')
-rw-r--r--install/ElggInstaller.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/install/ElggInstaller.php b/install/ElggInstaller.php
index 192139084..7d2e2355c 100644
--- a/install/ElggInstaller.php
+++ b/install/ElggInstaller.php
@@ -382,6 +382,12 @@ class ElggInstaller {
} while (FALSE); // PHP doesn't support breaking out of if statements
}
+ // bit of a hack to get the password help to show right number of characters
+ global $CONFIG;
+ $lang = get_current_language();
+ $CONFIG->translations[$lang]['install:admin:help:password1'] =
+ sprintf($CONFIG->translations[$lang]['install:admin:help:password1'], $CONFIG->min_password_length);
+
$formVars = $this->makeFormSticky($formVars, $submissionVars);
$this->render('admin', array('variables' => $formVars));
@@ -1287,6 +1293,12 @@ class ElggInstaller {
return FALSE;
}
+ $minLength = get_config('min_password_length');
+ if (strlen($submissionVars['password1']) < $minLength) {
+ register_error(elgg_echo('install:admin:password:tooshort'));
+ return FALSE;
+ }
+
// check that email address is email address
if ($submissionVars['email'] && !is_email_address($submissionVars['email'])) {
$msg = sprintf(elgg_echo('install:error:emailaddress'), $submissionVars['email']);