/** * @param \Adldap\Models\Entry $user * @throws AccountLockedException */ public function assertUserNotDisabled($user) { if ($user->hasAttribute($this->userAccountDisabledAttribute)) { $value = $user->getAttribute($this->userAccountDisabledAttribute); if (is_array($value)) { $value = $value[0]; } if (strtolower($value) === strtolower($this->userAccountDisabledValue)) { throw new AccountLockedException('User account is disabled', 1472740480); } } }