Esempio n. 1
1
 public function isLoggedIn()
 {
     // is the user set to remember?
     if (pisset('cookie', array('cookuname', 'cookpwd'))) {
         pset('session', array('uname' => $_COOKIE['cookuname'], 'pwd' => $_COOKIE['cookpwd']));
     }
     // user's session is still active
     if (pisset('session', array('uname', 'pwd'))) {
         // but is their user/pass pair correct?
         if (!$this->isUser($_SESSION['uname'], $_SESSION['pwd'], true)) {
             // NO? gtfo
             punset('session', array('uname', 'pwd'));
             return false;
         }
         return true;
     } else {
         return false;
     }
 }
Esempio n. 2
0
 function __construct()
 {
     $this->instances = pset();
     $this->eq_table = $this->getRelationTable(2);
     // eq is binary relation
 }