Commit 459abd4c authored by Micheal Mand's avatar Micheal Mand Committed by Nicolas Widart

Fix #255. Fix regression introduced in #251 for creating first user (#256)

from cli.
Signed-off-by: 's avatarMicheal Mand <micheal@kmdwebdesigns.com>
parent dece0495
...@@ -86,12 +86,16 @@ class SentinelUserRepository implements UserRepository ...@@ -86,12 +86,16 @@ class SentinelUserRepository implements UserRepository
public function createWithRolesFromCli($data, $roles, $activated = false) public function createWithRolesFromCli($data, $roles, $activated = false)
{ {
$this->hashPassword($data); $this->hashPassword($data);
$user = $this->user->create((array) $data, $activated); $user = $this->user->create((array) $data);
if (!empty($roles)) { if (!empty($roles)) {
$user->roles()->attach($roles); $user->roles()->attach($roles);
} }
if ($activated) {
$this->activateUser($user);
}
return $user; return $user;
} }
......
Markdown is supported
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