Example #1
0
 public static function oath($email, $password)
 {
     $p = DB::query()->select('password', 'id')->from('user')->where('email', '=', $email)->and_where('`check-e`', '=', 1)->execute()->current();
     if ($p === false) {
         return false;
     }
     $data = unserialize($p['password']);
     $user = new Users();
     if ($user->hash_check($password, $data['hash'], $data['salt'])) {
         STD::set_cookie('rememberme', $p['id']);
         return true;
     }
     return false;
 }
Example #2
0
 public function show()
 {
     $code = STD::arr($this->code_error, $this->message, $this->code_error['500']);
     Controller::factory()->header($_SERVER['SERVER_PROTOCOL'], $code);
     View::factory()->bind('error', $code)->response('http_error/default');
 }