本文整理汇总了PHP中ISafe::clear方法的典型用法代码示例。如果您正苦于以下问题:PHP ISafe::clear方法的具体用法?PHP ISafe::clear怎么用?PHP ISafe::clear使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISafe
的用法示例。
在下文中一共展示了ISafe::clear方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: logout
function logout()
{
ISafe::clear('seller_id');
ISafe::clear('seller_name');
ISafe::clear('seller_pwd');
ISafe::clearAll();
$this->redirect('index');
}
示例2: logout
function logout()
{
ISafe::clear('admin_id');
ISafe::clear('admin_right');
ISafe::clear('admin_name');
ISafe::clear('admin_pwd');
ISafe::clearAll();
$this->redirect('index');
}
示例3: getUser
/**
* @brief 获取通用的注册用户数组
*/
public static function getUser()
{
$user = array('user_id' => ISafe::get('user_id'), 'username' => ISafe::get('username'), 'head_ico' => ISafe::get('head_ico'), 'user_pwd' => ISafe::get('user_pwd'));
if (self::isValidUser($user['username'], $user['user_pwd'])) {
return $user;
} else {
ISafe::clear('user_id');
ISafe::clear('username');
ISafe::clear('head_ico');
ISafe::clear('user_pwd');
return null;
}
}
示例4: checkUserRights
public static function checkUserRights()
{
$object = IWeb::$app->getController();
$user = array();
$user['user_id'] = intval(ISafe::get('user_id'));
$user['username'] = ISafe::get('username');
$user['head_ico'] = ISafe::get('head_ico');
$user['user_pwd'] = ISafe::get('user_pwd');
if (self::isValidUser($user['username'], $user['user_pwd'])) {
$object->user = $user;
} else {
ISafe::clear('user_id');
ISafe::clear('user_pwd');
ISafe::clear('username');
ISafe::clear('head_ico');
}
}
示例5: checkUserRights
public function checkUserRights()
{
$object = $this->ctrlObj;
$user = array();
$user['user_id'] = intval(ISafe::get('user_id'));
$user['username'] = ISafe::get('username');
$user['head_ico'] = ISafe::get('head_ico');
$user['user_pwd'] = ISafe::get('user_pwd');
if (self::isValidUser($user['username'], $user['user_pwd'])) {
$object->user = $user;
} else {
ISafe::clear('user_id');
ISafe::clear('user_pwd');
ISafe::clear('username');
ISafe::clear('head_ico');
}
}