App\Modules\Users\Controllers\Registrar::verify PHP Method

verify() public method

Display the password reminder view.
public verify ( $token ) : Response
return Response
    public function verify($token)
    {
        $user = User::where('activation_code', $token)->where('active', '=', 0);
        // If the User is available.
        if ($user->count()) {
            $user = $user->first();
            // Update the User status to active.
            $user->active = 1;
            $user->activation_code = null;
            if ($user->save()) {
                // Prepare the flash message.
                $status = __d('users', 'Activated! You can now Sign in!');
                return Redirect::to('login')->withStatus($status);
            }
        }
        $status = __d('users', 'We could not activate your Account. Try again later.');
        return Redirect::to('register/status')->withStatus($status);
    }