]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
RequirePassword
authorGarret Buell <terragb@gmail.com>
Sat, 30 Aug 2008 19:50:36 +0000 (15:50 -0400)
committerGarret Buell <terragb@gmail.com>
Sat, 30 Aug 2008 19:50:36 +0000 (15:50 -0400)
Require a password with at least 6 characters when registering.

darcs-hash:20080830195036-e3c0d-6b4cac221674240e1a8383675b69863f54dd2525.gz

actions/register.php

index aee99b69384f2ecbdf5462a81a09d256b26384b7..f366bd3e0015a1ac38151d00254c22c0c065da15 100644 (file)
@@ -87,6 +87,9 @@ class RegisterAction extends Action {
                } else if (!is_null($location) && strlen($location) > 255) {
                        $this->show_form(_('Location is too long (max 255 chars).'));
                        return;
+               } else if (strlen($password) < 6) {
+                       $this->show_form(_('Password must be 6 or more characters.'));
+                       return;
                } else if ($password != $confirm) {
                        $this->show_form(_('Passwords don\'t match.'));
                } else if ($user = User::register(array('nickname' => $nickname, 'password' => $password, 'email' => $email,