Dev/v1.2 (#4)
Co-authored-by: ISMAIL MASSERAN <topaz@Mac.dlinkrouter.local> Reviewed-on: #4
This commit was merged in pull request #4.
This commit is contained in:
@@ -121,6 +121,17 @@ class UserService
|
||||
/**
|
||||
* @return array{}|array{error: string}
|
||||
*/
|
||||
public function completeOnboarding(User $user): User
|
||||
{
|
||||
if ($user->onboarding_completed_at === null) {
|
||||
$user->update(['onboarding_completed_at' => now()]);
|
||||
}
|
||||
|
||||
$user->load(['roles.permissions']);
|
||||
|
||||
return $user;
|
||||
}
|
||||
|
||||
public function updatePassword(User $user, string $currentPassword, string $newPassword): array
|
||||
{
|
||||
if (! Hash::check($currentPassword, $user->password)) {
|
||||
|
||||
Reference in New Issue
Block a user