Beispiel #1
0
 public static function getUser($key)
 {
     if (isset($_SESSION[$key])) {
         $value = $_SESSION[$key];
         return unserialize($value);
     } elseif (isset($_COOKIE[$key])) {
         $str = 'avtobus12troleibus23h23';
         $encrypted = $_COOKIE[$key];
         $email = FL::decrypted($encrypted, $str);
         return UserModel::getByColumn('email', $email);
     } else {
         return false;
     }
 }