Sentinel\Repositories\User\SentryUserRepository::unBan PHP Method

unBan() public method

Remove a users' ban
public unBan ( integer $id ) : Array
$id integer
return Array
    public function unBan($id)
    {
        try {
            // Find the user using the user id
            $throttle = $this->sentry->findThrottlerByUserId($id);
            // Un-ban the user
            $throttle->unBan();
            // Fire the 'un-ban user event'
            $this->dispatcher->fire('sentinel.user.unbanned', ['userId' => $id]);
            return new SuccessResponse(trans('Sentinel::users.unbanned'), ['userId' => $id]);
        } catch (UserNotFoundException $e) {
            $message = trans('Sentinel::sessions.invalid');
            return new ExceptionResponse($message);
        }
    }