Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
$passpword use direct assignment instaed of appending; check if $pass…
…word is null for fallback

Signed-off-by: Murielle Lerch <[email protected]>
  • Loading branch information
MoonISO committed Jul 28, 2020
commit a25e4e7f4d28fc057a607cd46f9b29cbf817a441
5 changes: 2 additions & 3 deletions apps/provisioning_api/lib/Controller/UsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,8 @@ public function addUser(string $userid,
$passwordEvent = new GenerateSecurePasswordEvent();
$this->eventDispatcher->dispatchTyped($passwordEvent);
$passwordEvent->getPassword();
if(isset($passwordEvent)){
$password .= $passwordEvent->getPassword();
} else {
$password = $passwordEvent->getPassword();
if($password === null){
// Fallback: ensure to pass password_policy in any case
$password = $this->secureRandom->generate(10);
$password .= $this->secureRandom->generate(1, ISecureRandom::CHAR_UPPER);
Expand Down