Skip to content
This repository has been archived by the owner on May 8, 2019. It is now read-only.

Commit

Permalink
Added Minimum length to the new password. Length is taken from the co…
Browse files Browse the repository at this point in the history
…nfiguration
  • Loading branch information
Koen Huybrechts committed Apr 28, 2011
1 parent 7a3317b commit 98ce761
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 54 deletions.
7 changes: 0 additions & 7 deletions .gitignore

This file was deleted.

44 changes: 0 additions & 44 deletions application/configs/application.ini

This file was deleted.

6 changes: 3 additions & 3 deletions application/modules/auth/controllers/PasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,13 @@ public function updatePassword()
# get params
$data = $this->_request->getPost();

$form->getElement('newPassword')->addValidator('NotIdentical', false, array('token' => $data['currentPassword']));
$form->getElement('newPassword')->addValidator('NotIdentical', false, array('token' => $data['currentPassword']))
->addValidator('stringLength', false, array($this->_auth->password->length, 100));
$form->getElement('confirmPassword')->addValidator('Identical', false, array('token' => $data['newPassword']));

# check validate form
if ($form->isValid($data)) {
die();
# attempt to resend password
# attempt update the password
$user = $this->_em->getRepository('Auth_Model_Account')->findOneBy(array('id' => Zend_Auth::getInstance()->getIdentity()->getId()));

// @Todo Create one function where we can generate the correct hash
Expand Down

3 comments on commit 98ce761

@eddiejaoude
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happened to .gitignore & application.ini files? In the latest source there does not seem to be a config directory anymore?

@koenHuybrechts
Copy link
Collaborator

@koenHuybrechts koenHuybrechts commented on 98ce761 Apr 28, 2011 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eddiejaoude
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If they are already staged the ignore will not have an effect on them.

Sure I will revert them when I get back tonight :)

Please sign in to comment.