Esempio n. 1
0
 public static function log_in($email, $password)
 {
     $acc = null;
     if (!($acc = static::load_one(array('email' => $email, 'hash' => hash::generate($password))))) {
         return false;
     }
     $_SESSION['.account_id'] = $acc->id;
     return true;
 }