Exemplo n.º 1
0
 public static function getByLongName($username)
 {
     if (0 === ($sid = (int) Common::regex('/^.+\\{(\\d+)\\}$/', $username))) {
         return false;
     }
     $username = Shadowfunc::toShortname($username);
     $username = self::escape($username);
     if (false === ($player = self::table(__CLASS__)->selectFirstObject('*', "sr4pl_sid={$sid} AND sr4pl_name='{$username}'"))) {
         return false;
     }
     return self::reloadPlayer($player);
 }