change password for users on profile page#15
change password for users on profile page#15WLsupport wants to merge 10 commits intoaimeos:masterfrom
Conversation
| namespace Aimeos\Controller\Frontend\Customer; | ||
|
|
||
|
|
||
| use Illuminate\Support\Facades\Log; |
There was a problem hiding this comment.
Please remove all Laravel specific code
| * | ||
| * @param array $values Values added to the customer item (new or existing) like "customer.code" | ||
| * @return \Aimeos\Controller\Frontend\Customer\Iface Customer controller for fluent interface | ||
| * @return Iface Customer controller for fluent interface |
There was a problem hiding this comment.
I think phpstorm did some magic, i reverted all import simplifications back to the full path.
| if ( $oldPassword = $values['customer.oldpassword'] ?? null) { | ||
| $confirmed = $values['customer.newpassword'] === $values['customer.confirmnewpassword']; | ||
| $isNew = $values['customer.newpassword'] !== $values['customer.oldpassword']; | ||
| if ($this->item->verifyPassword($oldPassword) && $confirmed && $isNew) { |
There was a problem hiding this comment.
This method isn't available in the customer item yet
There was a problem hiding this comment.
i forgot the aimeos-core pr
| $confirmed = $values['customer.newpassword'] === $values['customer.confirmnewpassword']; | ||
| $isNew = $values['customer.newpassword'] !== $values['customer.oldpassword']; | ||
| if ($this->item->verifyPassword($oldPassword) && $confirmed && $isNew) { | ||
| $this->item = $this->item->setPassword($values['customer.newpassword']); |
There was a problem hiding this comment.
There are a few rules that have to be enforced for passwords:
- min 8 chars
- max 64 chars
- includes upper and lower case chars
- includes numbers
There was a problem hiding this comment.
i implemented the check in ai-client-html, it wont reach this code if the requirements arent meet
| if( !isset( self::$aimeos ) ) | ||
| { | ||
| require_once 'Bootstrap.php'; | ||
| require_once 'vendor/aimeos/aimeos-core/Bootstrap.php'; |
There was a problem hiding this comment.
Can you please remove that as it's wrong when the test setup is right
| $confirmed = $values['customer.newpassword'] === $values['customer.confirmnewpassword']; | ||
| $isNew = $values['customer.newpassword'] !== $values['customer.oldpassword']; | ||
|
|
||
| $passHelper = $this->getContext()->password(); |
There was a problem hiding this comment.
Can you please fix the indentions? We use one tab per indention
.gitignore
Outdated
| vendor | ||
| composer.lock |
There was a problem hiding this comment.
Remove those because they are not necessary if the test setup is correct (ai-controller-frontend extension is located in ./ext/ai-controller-frontend/ directory of aimeos-core checkout)
|
The return types are now inconsistent, sometimes it's For the tests to succeed, you need to add these lines here: |
No description provided.