public function excute() { $loginUser = Lib_User::GetLoginUser(); if ($loginUser) { Utility::Redirect("/demo/list"); } $post = RequestParam::Post(); if ($post) { $username = $post['username']; $pwd = $post['pwd']; $loginUser = Lib_User::Login($username, $pwd); if ($loginUser) { System::AddNotice("登陆成功"); Utility::Redirect("/demo/list"); } } $param = array(); $this->show($param); }
public function getLoginUser() { $loginUser = Lib_User::GetLoginUser(); return $loginUser; }