opensupports/server/models/SessionCookie.php
LautaroCesso 4077dac8c7
Remember me function for staffs (#866)
* fix warning in checbox in form field.

* Add remember me function for staffs.

* Add staff instance in session cookie.

* Add result data staff in get user data in auto login.

* Fix remember me function for user.

* Fix login test rb and add remember me function test in login rb.

* Resolve github maxi comments.
2020-08-19 23:33:40 -03:00

30 lines
841 B
PHP
Executable File

<?php
/**
* @api {OBJECT} SessionCookie SessionCookie
* @apiVersion 4.8.0
* @apiGroup Data Structures
* @apiParam {Boolean} isStaff Indicates if it wants to login a staff or a regular user.
* @apiParam {Object} user The user.
* @apiParam {Object} staff The staff.
* @apiParam {String} token Token of the session, used to verify the session when making other requests.
* @apiParam {String} ip The ip.
* @apiParam {String} creationDate The creationDate.
* @apiParam {String} expirationDate The expirationDate.
*/
class SessionCookie extends DataStore {
const TABLE = 'sessioncookie';
public static function getProps() {
return array (
'isStaff',
'staff',
'user',
'token',
'ip',
'creationDate',
'expirationDate'
);
}
}