DONE: fix error on pagination where it cannot redirect to next pages, add onboarding_completed_at for new registered user, move dashboard page design into modules folder
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