summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorMeitar Moscovitz <meitarm@gmail.com>2009-01-28 08:55:03 -0500
committerEvan Prodromou <git@evanprodromou.name>2009-01-28 08:55:03 -0500
commite37e9c2084c91eb4e74f73a5356f5a2f538ee2e0 (patch)
treea1b4b9134767c8cf5fc0be32942a61e1504d50d2 /actions
parentf761031d0acdc03add5a6bd9a125575463da2582 (diff)
Fix password settings
Diffstat (limited to 'actions')
-rw-r--r--actions/passwordsettings.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/actions/passwordsettings.php b/actions/passwordsettings.php
index 17b2de4e8..bdce61035 100644
--- a/actions/passwordsettings.php
+++ b/actions/passwordsettings.php
@@ -84,7 +84,7 @@ class PasswordsettingsAction extends AccountSettingsAction
'id' => 'form_password',
'class' => 'form_settings',
'action' =>
- common_local_url('profilesettings')));
+ common_local_url('passwordsettings')));
$this->elementStart('fieldset');
$this->element('legend', null, _('Password change'));
$this->hidden('token', common_session_token());
@@ -141,7 +141,12 @@ class PasswordsettingsAction extends AccountSettingsAction
$newpassword = $this->arg('newpassword');
$confirm = $this->arg('confirm');
- if (0 != strcmp($newpassword, $confirm)) {
+ # Some validation
+
+ if (strlen($newpassword) < 6) {
+ $this->showForm(_('Password must be 6 or more characters.'));
+ return;
+ } else if (0 != strcmp($newpassword, $confirm)) {
$this->showForm(_('Passwords don\'t match.'));
return;
}