complete() публичный Метод

Completes the activation for the given user.
public complete ( Cartalyst\Sentinel\Users\UserInterface $user, string $code ) : boolean
$user Cartalyst\Sentinel\Users\UserInterface
$code string
Результат boolean
Пример #1
0
 /**
  * {@inheritDoc}
  */
 public function activate(array $data, $validate = true)
 {
     $this->rules = ['email' => 'required|email', 'activation_code' => 'required'];
     if ($validate) {
         $this->validate($data);
     }
     $user = $this->findByCredentials(['login' => $data['email']]);
     if (!$this->illuminateActivationRepository->complete($user, $data['activation_code'])) {
         throw new AuthenticationException(trans('dashboard::dashboard.errors.auth.activation.complete'));
     }
     return true;
 }