function logout() { ISafe::clear('seller_id'); ISafe::clear('seller_name'); ISafe::clear('seller_pwd'); ISafe::clearAll(); $this->redirect('index'); }
function logout() { ISafe::clear('admin_id'); ISafe::clear('admin_right'); ISafe::clear('admin_name'); ISafe::clear('admin_pwd'); ISafe::clearAll(); $this->redirect('index'); }
/** * @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; } }
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'); } }
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'); } }