/**
  * @see WhiteListEditForm::validateUser()
  */
 protected function validateUser(UserSession $user)
 {
     parent::validateUser($user);
     if ($user->getPermission('user.profile.blacklist.canNotBeIgnored')) {
         throw new UserInputException('username', 'canNotIgnore');
     }
     // friends cannot be ignored
     $sql = "SELECT\twhiteUserID\n\t\t\tFROM\twcf" . WCF_N . "_user_whitelist\n\t\t\tWHERE\tuserID = " . WCF::getUser()->userID . "\n\t\t\t\tAND whiteUserID = " . $user->userID;
     $row = WCF::getDB()->getFirstRow($sql);
     if (!empty($row['whiteUserID'])) {
         throw new UserInputException('username', 'canNotIgnore');
     }
 }
 /**
  * @see WhiteListEditForm::validateUser()
  */
 protected function validateUser(UserSession $user)
 {
     parent::validateUser($user);
     if (!$user->allowFriendshipOfferings) {
         throw new UserInputException('username', 'userDoesNotAllowFriendshipOfferings');
     }
 }