示例#1
0
 public function login()
 {
     if (WY_Request::isPost()) {
         $username = $_POST['username'];
         $password = sha1($_POST['password'] . WY_Config::get('salt'));
         $this->log = WY_Auth::login($username, $password);
         if ($this->log) {
             WY_Response::redirect('admin');
         } else {
             WY_Response::redirect('login');
         }
     }
 }