Exemple #1
0
function Users_before_Q_session_save($params)
{
    $row = $params['row'];
    $row->deviceId = "";
    $row->timeout = 0;
    $row->content = isset($_SESSION) ? Q::json_encode($_SESSION, JSON_FORCE_OBJECT) : "{}";
    $row->duration = Q_Config::get('Q', 'session', 'durations', Q_Request::formFactor(), Q_Config::expect('Q', 'session', 'durations', 'session'));
}
Exemple #2
0
 static function durationName()
 {
     $ff = Q_Request::formFactor();
     $duration = Q_Config::get('Q', 'session', 'durations', $ff, null);
     return isset($duration) ? $ff : 'session';
 }
Exemple #3
0
 /**
  * Some standard info to be stored in sessions, devices, etc.
  * @return {array}
  */
 static function userAgentInfo()
 {
     $info = array('formFactor' => Q_Request::formFactor(), 'platform' => Q_Request::platform(), 'version' => Q_Request::OSVersion());
     $fields = Q_Config::get('Q', 'session', 'userAgentInfo', array());
     return Q::take($info, $fields);
 }