Skip to content
Snippets Groups Projects
Commit 8cbd2596 authored by Laurent's avatar Laurent
Browse files

dev #40971 fix functional demo

parent 17eb5a31
Branches
Tags
3 merge requests!2334Master,!2178Dev#40971 pouvoir prendre l email comme identifiant alternatif cctp agglo2b,!2174Dev#40971 pouvoir prendre l email comme identifiant alternatif cctp agglo2b
Pipeline #1614 passed with stage
in 11 minutes and 3 seconds
......@@ -143,7 +143,6 @@ class AuthController extends ZendAfi_Controller_Action {
->setPassword($this->_request->getPost('secure_password'))
->save();
ZendAfi_Auth::getInstance()->clearIdentity();
$this->getHelper('notify')->bePopup();
$this->_helper->notify($this->_('Votre compte est sécurisé. Vous pouvez maintenant vous connecter avec votre courriel et votre nouveau mot de passe.'));
......
......@@ -21,23 +21,15 @@
class ZendAfi_Form_SecurePassword extends ZendAfi_Form {
public function init() {
parent::init();
$this->addElement('text',
'card',
['label' => $this->_('Numéro de carte'),
'required' => true,
'allowEmpty' => false])
->addElement('password',
'current_password',
['label' => $this->_('Mot de passe actuel'),
'required' => true,
'renderPassword' => true,
'readonly' => 'readonly',
'allowEmpty' => false])
->addElement('password',
'secure_password',
['label' => $this->_('Nouveau mot de passe'),
......@@ -53,6 +45,7 @@ class ZendAfi_Form_SecurePassword extends ZendAfi_Form {
'allowEmpty' => false,
'validators' => [new ZendAfi_Validate_PasswordEquals('secure_password')]])
->addElement('hidden', 'current_password')
->addElement('hidden', 'password_hint')
->addElement('hidden', 'pattern')
......@@ -61,4 +54,3 @@ class ZendAfi_Form_SecurePassword extends ZendAfi_Form {
['legend' => '']);
}
}
?>
\ No newline at end of file
......@@ -115,7 +115,7 @@ class AuthControllerWithNanookPostLoginWithMailAndUnsecurePassword
/** @test */
public function formShouldContainsCurrentPasswordField() {
$this->assertXPath('//form//input[@type="password"][@name="current_password"][@readonly][@value="1987"]');
$this->assertXPath('//form//input[@type="hidden"][@name="current_password"][@value="1987"]');
}
......@@ -195,8 +195,8 @@ class AuthControllerWithNanookPostSecurePasswordWithMailAndUnsecurePassword
/** @test */
public function userShouldNotBeConnected() {
$this->assertNull(Class_Users::getIdentity());
public function userShouldBeConnected() {
$this->assertNotNull(Class_Users::getIdentity());
}
}
......@@ -232,7 +232,7 @@ class AuthControllerWithNanookPostDoSecurePasswordWithWrongCard
/** @test */
public function passwordShouldContains1987() {
$this->assertXPath('//form//input[@type="password"][@name="current_password"][@value="1987"]');
$this->assertXPath('//form//input[@type="hidden"][@name="current_password"][@value="1987"]');
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment