Пример #1
0
 public static function setUserBanState($userName, $banState)
 {
     if ($banState != self::USER_BAN_NONE) {
         self::$bannedUsers[strtolower($userName)] = $banState;
     } else {
         unset(self::$bannedUsers[strtolower($userName)]);
     }
     $list = [];
     foreach (self::$bannedUsers as $user => $banState) {
         $list[] = $user . "\t" . $banState;
     }
     TextHelper::putSimpleList(Config::$bannedUsersListPath, $list);
 }