本文整理汇总了PHP中QQN::WpUsers方法的典型用法代码示例。如果您正苦于以下问题:PHP QQN::WpUsers方法的具体用法?PHP QQN::WpUsers怎么用?PHP QQN::WpUsers使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QQN
的用法示例。
在下文中一共展示了QQN::WpUsers方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: process_object
/**
* @param DleUsers $objDleUsers The DB ORM object to process
*/
protected function process_object($objDleUsers)
{
// wp: ID, user_login, user_nicename, user_email, user_registered, display_name
// dl: user_id, name, name, email, FROM_UNIXTIME( reg_date ), fullname
$strEmail = $objDleUsers->Email;
if ($strEmail && strlen($strEmail)) {
// check if already copied
if (!WpUsers::QueryCount(QQ::Equal(QQN::WpUsers()->UserEmail, $strEmail))) {
$objWpUsers = new WpUsers();
$objWpUsers->Initialize();
// set defaults
$objWpUsers->UserLogin = $objDleUsers->Name;
$objWpUsers->UserNicename = $objDleUsers->Name;
$objWpUsers->UserEmail = $objDleUsers->Email;
$objWpUsers->UserRegistered = QDateTime::FromTimestamp(intval($objDleUsers->RegDate));
$objWpUsers->DisplayName = $objDleUsers->Fullname;
$objWpUsers->UserPass = '';
$objWpUsers->UserUrl = '';
$objWpUsers->UserActivationKey = '';
$objWpUsers->UserStatus = 0;
$objWpUsers->Save();
$this->intUserCount++;
}
}
}
示例2: LoadWpUser
/**
* @return WpUsers The Wordpress user for this DLE post author.
*/
public function LoadWpUser()
{
$objDleUsers = DleUsers::LoadByName($this->Autor);
if (!$objDleUsers) {
return null;
}
return WpUsers::QuerySingle(QQ::Equal(QQN::WpUsers()->UserEmail, $objDleUsers->Email), QQ::Clause(QQ::LimitInfo(1)));
}
示例3: LoadWpUsers
/**
* @return WpUsers|null The Wordpress user for this DLE comment author.
*/
public function LoadWpUsers()
{
$objDleUsers = $this->User;
if (!$objDleUsers) {
return WpUsers::QuerySingle(QQ::Equal(QQN::WpUsers()->UserEmail, $this->Email), QQ::Clause(QQ::LimitInfo(1)));
}
return $objDleUsers->LoadWpUsers();
}
示例4: LoadFirst
public function LoadFirst()
{
return self::QuerySingle(QQ::All(), QQ::Clause(QQ::OrderBy(QQN::WpUsers()->Id), QQ::LimitInfo(1)));
}
示例5: CountByUserNicename
/**
* Count WpUserses
* by UserNicename Index(es)
* @param string $strUserNicename
* @return int
*/
public static function CountByUserNicename($strUserNicename)
{
// Call WpUsers::QueryCount to perform the CountByUserNicename query
return WpUsers::QueryCount(QQ::Equal(QQN::WpUsers()->UserNicename, $strUserNicename));
}
示例6: LoadWpUsers
/**
* @return WpUsers The Wordpress user for this DLE user.
*/
public function LoadWpUsers()
{
return WpUsers::QuerySingle(QQ::Equal(QQN::WpUsers()->UserEmail, $this->Email), QQ::Clause(QQ::LimitInfo(1)));
}