Esempio n. 1
0
 function getLoggedInUser()
 {
     $id = person::getLoggedInId();
     if ($id) {
         return new Person((int) $id);
     } else {
         return NULL;
     }
 }
Esempio n. 2
0
 function postLogin($p)
 {
     $success = person::auth($_POST['username'], $_POST['password']);
     if (!$success) {
         $this->redirect('login?auth=bad');
     }
     $id = person::getLoggedInId();
     $this->redirect("main");
 }