本文整理汇总了PHP中Model_User::getUserType方法的典型用法代码示例。如果您正苦于以下问题:PHP Model_User::getUserType方法的具体用法?PHP Model_User::getUserType怎么用?PHP Model_User::getUserType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Model_User
的用法示例。
在下文中一共展示了Model_User::getUserType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getCurrUser
/**
* 取得广告主登录信息
*/
public function getCurrUser($iType, $bLog = true)
{
$sKey = Model_User::getUserType($iType);
$this->aCurrUser = Util_Cookie::get(Yaf_G::getConf($sKey, 'cookie'));
if ($bLog && !empty($this->aCurrUser)) {
Model_ActionLog::setUser($this->aCurrUser['sEmail']);
}
return $this->aCurrUser;
}
示例2: login
/**
* 登录
* @param unknown $aUser
*/
public static function login($aUser)
{
$aCookie = array('iUserID' => $aUser['iUserID'], 'sEmail' => $aUser['sEmail'], 'sMobile' => $aUser['sMobile'], 'iType' => $aUser['iType'], 'sRealName' => $aUser['sRealName']);
$sKey = Model_User::getUserType($aUser['iType']);
$expire = Yaf_G::getConf('frontexpire', 'cookie');
Util_Cookie::set(Yaf_G::getConf($sKey, 'cookie'), $aCookie, $expire);
$sKey = Model_User::getUserType($aUser['iType'] == Model_User::TYPE_AD ? Model_User::TYPE_MEDIA : Model_User::TYPE_AD);
Util_Cookie::delete(Yaf_G::getConf($sKey, 'cookie'));
return $aCookie;
}
示例3: logoutAction
/**
* 用户退出
*/
public function logoutAction()
{
$iType = $this->getParam('type');
$sKey = Model_User::getUserType($iType);
Util_Cookie::delete(Yaf_G::getConf($sKey, 'cookie'));
if ($this->isPost()) {
return $this->showMsg('登出成功!', true);
} else {
return $this->redirect('/');
}
}