Exemplo n.º 1
0
 /**
  * Return the actual alliance.
  * 
  * @param	bool	Editor
  * @return	Alliance
  */
 public static function getAlliance($editor = false)
 {
     if ($editor) {
         if (self::$allianceEditor === null) {
             require_once LW_DIR . 'lib/data/user/alliance/AllianceEditor.class.php';
             self::$allianceEditor = Alliance::getByUserID(self::getUser()->userID, true);
         }
         return self::$allianceEditor;
     } else {
         if (self::$alliance === null) {
             require_once LW_DIR . 'lib/data/user/alliance/Alliance.class.php';
             self::$alliance = Alliance::getByUserID(self::getUser()->userID, false);
         }
         return self::$alliance;
     }
 }