/** * Validates password * $post has $post['password'] and $post['password_confirm'] * @param array $post * @return boolean */ public function validatePassword($post) { // Validate password strength $score = BootWiki::checkPassword($post['password']); if ($score < 1) { BootWiki::setMessage('Invalid password. Password is ' . BootWiki::getPasswordDescription($score)); return false; } // Validate password match if ($post['password'] != $post['password_confirm']) { BootWiki::setMessage('Password was not confirmed'); return false; } return true; }