/home/techb158/immovalet.com/platform/core/acl/src/Services
Edit: /home/techb158/immovalet.com/platform/core/acl/src/Services/ActivateUserService.php (1197B)
activationRepository = $activationRepository;
}
/**
* Activates the given user.
*
* @param User $user
* @return bool
* @throws InvalidArgumentException
*/
public function activate($user)
{
if (!$user instanceof User) {
throw new InvalidArgumentException('No valid user was provided.');
}
if ($this->activationRepository->completed($user)) {
return false;
}
event('acl.activating', $user);
$activation = $this->activationRepository->createUser($user);
event('acl.activated', [$user, $activation]);
return $this->activationRepository->complete($user, $activation->code);
}
}