]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fix password settings
authorMeitar Moscovitz <meitarm@gmail.com>
Wed, 28 Jan 2009 13:55:03 +0000 (08:55 -0500)
committerEvan Prodromou <git@evanprodromou.name>
Wed, 28 Jan 2009 13:55:03 +0000 (08:55 -0500)
actions/passwordsettings.php

index 17b2de4e8601bacc17b8e69edacefa4f134d19b6..bdce6103502e496d0ee07709b878491f2d12859c 100644 (file)
@@ -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;
         }