Skip to content

Commit

Permalink
Fix usage of removed method
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Wurst <[email protected]>
  • Loading branch information
ChristophWurst committed Nov 19, 2019
1 parent f488816 commit cd0b14a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/GuestManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,12 @@ public function isGuest($user = null) {
}

public function createGuest(IUser $createdBy, $userId, $email, $displayName = '', $language = '') {
$passwordEvent = new Event(null, ['password' => $this->secureRandom->generate(20)]);
$password = $this->secureRandom->generate(20);
$passwordEvent = new Event(null, ['password' => $password]);
$this->eventDispatcher->dispatch('OCP\PasswordPolicy::generate', $passwordEvent);
$this->userBackend->createUser(
$userId,
$passwordEvent->getArgument('password')
$password
);

$this->config->setUserValue($userId, 'settings', 'email', $email);
Expand Down

0 comments on commit cd0b14a

Please sign in to comment.