private function checkActivatedStatus(User $user)
    {
        if (!$user->isActivated()) {
            throw new DisabledException(sprintf('Account `%s`is disabled.', $user->getUsername()));
        }

        return $user;
    }
private function checkActivatedStatus(User $user)
    {
        if (!$user->isActivated()) {
            throw new DisabledException(sprintf('Account `%s`is disabled.', $user->getUsername()));
        }

        return $user;
    }
private function checkActivatedStatus ( User $ user ) { if ( ! $ user -> isActivated ( ) ) { throw new DisabledException ( sprintf ( 'Account `%s`is disabled.' , $ user -> getUsername ( ) ) ) ; } return $ user ; }
Checks that the user is activated

@param User $user The user

@return User

@throws DisabledException if the user is not activated
Checks that the user is activated