本文整理汇总了PHP中UserSession::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP UserSession::__construct方法的具体用法?PHP UserSession::__construct怎么用?PHP UserSession::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserSession
的用法示例。
在下文中一共展示了UserSession::__construct方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* @see UserSession::__construct()
*/
public function __construct($userID = null, $row = null, $username = null)
{
// user data
$this->sqlSelects .= " lw_user.*, ";
$this->sqlJoins .= " LEFT JOIN ugml" . LW_N . "_users\r\n\t\t\t\t\t\t\t\tAS lw_user\r\n\t\t\t\t\t\t\t\tON lw_user.id = user.userID ";
// other selects
$this->sqlSelects .= " lw_user.id AS lwUserID, ";
parent::__construct($userID, $row, $username);
}
示例2: __construct
/**
* @see UserProfile::__construct()
*/
public function __construct($userID = null, $row = null, $username = null, $email = null)
{
$this->sqlSelects .= ' lw_user.*, lw_stat.*, lw_user.password AS gamePassword, ';
$this->sqlJoins .= ' LEFT JOIN ugml_users lw_user ON (lw_user.id = user.userID) ';
$this->sqlJoins .= ' LEFT JOIN ugml_stat lw_stat ON (lw_stat.userID = user.userID) ';
// new stats
$this->sqlSelects .= " wot_stat.rank AS wotRank,\n\t\t\t\t\t\t\t\twot_stat.points AS wotPoints, ";
$this->sqlJoins .= " LEFT JOIN ugml_stat_entry \n\t\t\t\t\t\t\t\tAS wot_stat\n\t\t\t\t\t\t\t\tON wot_stat.statTypeID = " . self::STAT_TYPE_ID . "\n\t\t\t\t\t\t\t\t\tAND wot_stat.relationalID = user.userID ";
parent::__construct($userID, $row, $username, $email);
$this->points = $this->wotPoints;
$this->rank = $this->wotRank;
}
示例3: __construct
/**
* Creates a new UserProfile object.
*
* @see User::__construct()
*/
public function __construct($userID = null, $row = null, $username = null, $email = null, $sqlSelects = '', $sqlJoins = '')
{
$this->sqlSelects .= $sqlSelects . "session.requestURI, session.requestMethod, session.ipAddress, session.userAgent,\n\t\t\t\t\t\trank.*, avatar.*,";
$this->sqlJoins .= $sqlJoins . ' LEFT JOIN wcf' . WCF_N . '_avatar avatar ON (avatar.avatarID = user.avatarID) ' . ' LEFT JOIN wcf' . WCF_N . '_session session ON (session.userID = user.userID AND session.packageID = ' . PACKAGE_ID . ' AND session.lastActivityTime > ' . (TIME_NOW - USER_ONLINE_TIMEOUT) . ') ' . ' LEFT JOIN wcf' . WCF_N . '_user_rank rank ON (rank.rankID = user.rankID) ';
if (WCF::getUser()->userID) {
$this->sqlSelects .= 'hisWhitelist.userID AS buddy, hisBlacklist.userID AS ignoredUser,';
$this->sqlJoins .= ' LEFT JOIN wcf' . WCF_N . '_user_whitelist hisWhitelist
ON (hisWhitelist.userID = user.userID AND hisWhitelist.whiteUserID = ' . WCF::getUser()->userID . ' AND hisWhitelist.confirmed = 1) ' . ' LEFT JOIN wcf' . WCF_N . '_user_blacklist hisBlacklist
ON (hisBlacklist.userID = user.userID AND hisBlacklist.blackUserID = ' . WCF::getUser()->userID . ') ';
} else {
$this->sqlSelects .= '0 AS buddy, 0 AS ignoredUser,';
}
parent::__construct($userID, $row, $username, $email);
}
示例4: __construct
public function __construct($isAdmin = false, $timezone = 'America/New_York', $userId = 1)
{
parent::__construct($userId);
$this->FirstName = 'first';
$this->LastName = 'last';
$this->Email = 'first.last@email.com';
$this->IsAdmin = $isAdmin;
$this->Timezone = $timezone;
$this->HomepageId = 1;
$this->IsGroupAdmin = false;
$this->IsResourceAdmin = true;
$this->IsScheduleAdmin = false;
$this->LanguageCode = 'en_US';
$this->PublicId = 'public id';
$this->ScheduleId = 19;
}
示例5: __construct
/**
* @see UserSession::__construct()
*/
public function __construct($userID = null, $row = null, $username = null)
{
// user data
$this->sqlSelects .= " wot_user.*, ";
$this->sqlJoins .= " LEFT JOIN ugml" . LW_N . "_users\n\t\t\t\t\t\t\t\tAS wot_user\n\t\t\t\t\t\t\t\tON wot_user.id = user.userID ";
// new stats
$this->sqlSelects .= " wot_stat.rank AS wotRank,\n\t\t\t\t\t\t\t\twot_stat.points AS wotPoints, ";
$this->sqlJoins .= " LEFT JOIN ugml_stat_entry \n\t\t\t\t\t\t\t\tAS wot_stat\n\t\t\t\t\t\t\t\tON wot_stat.statTypeID = " . self::STAT_TYPE_ID . "\n\t\t\t\t\t\t\t\t\tAND wot_stat.relationalID = user.userID ";
// new stats 2
$this->sqlSelects .= " GROUP_CONCAT(DISTINCT\n\t\t\t\t\t\t\t\t\tCONCAT(wot_stat2.statTypeID, ',', wot_stat2.rank, ',', wot_stat2.points)\n\t\t\t\t\t\t\t\t\tSEPARATOR ';')\n\t\t\t\t\t\t\t\tAS statStr,";
$this->sqlJoins .= " LEFT JOIN ugml_stat_entry \n\t\t\t\t\t\t\t\tAS wot_stat2\n\t\t\t\t\t\t\t\tON wot_stat2.relationalID = user.userID ";
// buddies
$this->sqlSelects .= " CONCAT(\n\t\t\t\t\t\t\t\t\tCOALESCE(GROUP_CONCAT(DISTINCT wot_buddy1.owner SEPARATOR ','), ''),\n\t\t\t\t\t\t\t\t\t',',\n\t\t\t\t\t\t\t\t\tCOALESCE(GROUP_CONCAT(DISTINCT wot_buddy2.sender SEPARATOR ','), ''))\n\t\t\t\t\t\t\t\tAS buddy,";
$this->sqlJoins .= " LEFT JOIN ugml_buddy\n\t\t\t\t\t\t\t\tAS wot_buddy1\n\t\t\t\t\t\t\t\tON wot_buddy1.sender = user.userID";
$this->sqlJoins .= " LEFT JOIN ugml_buddy\n\t\t\t\t\t\t\t\tAS wot_buddy2\n\t\t\t\t\t\t\t\tON wot_buddy2.owner = user.userID";
// settings
$this->sqlSelects .= " GROUP_CONCAT(DISTINCT CONCAT(wot_setting.setting, ',', wot_setting.value) SEPARATOR '|') AS settingsStr,";
$this->sqlJoins .= " LEFT JOIN ugml_user_setting\n\t\t\t\t\t\t\t\tAS wot_setting\n\t\t\t\t\t\t\t\tON user.userID = wot_setting.userID";
// alliance
$this->sqlSelects .= " wot_alliance.ally_tag AS allianceTag,\n\t\t\t\t\t\t\t\twot_alliance.ally_name AS allianceName,\n\t\t\t\t\t\t\t\twot_alliance.id AS allianceID,";
$this->sqlJoins .= " LEFT JOIN ugml_alliance\n\t\t\t\t\t\t\t\tAS wot_alliance\n\t\t\t\t\t\t\t\tON wot_user.ally_id = wot_alliance.id";
// other selects
$this->sqlSelects .= " wot_user.id AS lwUserID, wot_user.current_planet AS actualPlanet, wot_user.banned AS wotBanned, ";
parent::__construct($userID, $row, $username);
$this->points = $this->wotPoints;
$this->rank = $this->wotRank;
// process settings
$parts = explode('|', $this->settingsStr);
foreach ($parts as $part) {
if (!empty($part) && strpos($part, ',')) {
list($setting, $value) = explode(',', $part);
$this->settings[$setting] = $value;
}
}
// process stats
$parts = explode(';', $this->statStr);
foreach ($parts as $part) {
if (!empty($part) && strpos($part, ',')) {
list($statTypeID, $rank, $points) = explode(',', $part);
$this->stats[$statTypeID] = array('rank' => $rank, 'points' => $points);
}
}
//$this->checkPlanetChange();
}
示例6: __construct
/**
* @see UserSession::__construct()
*/
public function __construct($userID = null, $row = null, $username = null)
{
// user data
$this->sqlSelects .= " lw_user.*, ";
$this->sqlJoins .= " LEFT JOIN ugml" . LW_N . "_users\r\n\t\t\t\t\t\t\t\tAS lw_user\r\n\t\t\t\t\t\t\t\tON lw_user.id = user.userID ";
// new stats
$this->sqlSelects .= " wot_stat.rank AS wotRank,\r\n\t\t\t\t\t\t\t\twot_stat.points AS wotPoints, ";
$this->sqlJoins .= " LEFT JOIN ugml_stat_entry \r\n\t\t\t\t\t\t\t\tAS wot_stat\r\n\t\t\t\t\t\t\t\tON wot_stat.statTypeID = " . self::STAT_TYPE_ID . "\r\n\t\t\t\t\t\t\t\t\tAND wot_stat.relationalID = user.userID ";
// buddies
$this->sqlSelects .= " CONCAT(\r\n\t\t\t\t\t\t\t\t\tCOALESCE(GROUP_CONCAT(DISTINCT wot_buddy1.owner SEPARATOR ','), ''),\r\n\t\t\t\t\t\t\t\t\t',',\r\n\t\t\t\t\t\t\t\t\tCOALESCE(GROUP_CONCAT(DISTINCT wot_buddy2.sender SEPARATOR ','), ''))\r\n\t\t\t\t\t\t\t\tAS buddy,";
$this->sqlJoins .= " LEFT JOIN ugml_buddy\r\n\t\t\t\t\t\t\t\tAS wot_buddy1\r\n\t\t\t\t\t\t\t\tON wot_buddy1.sender = user.userID";
$this->sqlJoins .= " LEFT JOIN ugml_buddy\r\n\t\t\t\t\t\t\t\tAS wot_buddy2\r\n\t\t\t\t\t\t\t\tON wot_buddy2.owner = user.userID";
// other selects
$this->sqlSelects .= " lw_user.id AS lwUserID, lw_user.current_planet AS actualPlanet, ";
parent::__construct($userID, $row, $username);
$this->points = $this->wotPoints;
$this->rank = $this->wotRank;
//$this->checkPlanetChange();
}
示例7: __construct
public function __construct($id)
{
parent::__construct($id);
$this->SessionToken = WebServiceSessionToken::Generate();
$this->SessionExpiration = WebServiceExpiration::Create();
}
示例8: __construct
public function __construct()
{
parent::__construct(0);
$this->Timezone = Configuration::Instance()->GetDefaultTimezone();
}