|
|
| __construct (User $user, CuAdmin $cuAdmin, $cookie_prefix='usr') |
| |
|
| IsAccountLocked () |
| |
|
| IsValidDeviceCookie ($cu) |
| |
|
| IsValidMammothDeviceCookie ($cu, $hbenv) |
| |
|
| SetLoginDeviceCookie ($hbenv) |
| |
| | CreateSessionTicket ($hbenv, $mc, $cu) |
| |
|
| ValidateUser ($password='', $remember_me=false) |
| |
|
| IsMFAMode () |
| |
|
|
| $new_user = false |
| |
|
| $errors = NULL |
| |
|
|
| UpdateMammothDeviceCookie ($cu, $hbenv, $mammothCookieName) |
| |
|
|
| $cu = NULL |
| |
|
| $cookie_prefix = '' |
| |
PHP User Login Class
Handles username and password validation, challenge questions, etc.
Written: 10/2019
Definition at line 12 of file UserLogin.php.
◆ CreateSessionTicket()
| UserLogin::CreateSessionTicket |
( |
|
$hbenv, |
|
|
|
$mc, |
|
|
|
$cu |
|
) |
| |
CreateSessionTicket
Definition at line 240 of file UserLogin.php.
242 $hbenv[
'platform'] = $hbenv[
'platform'];
243 $hbenv[
'Uid'] = $this->user->data[
'user_id'];
244 $hbenv[
'Cn'] = $this->user->data[
'user_name'];
245 $hbenv[
'Ce'] = time() + $hbenv[
'SYSENV'][
'ticket'][
'expires'];
246 $hbenv[
'Clw'] = $this->cuAdmin->admininfo[
'livewait'];
247 $hbenv[
'Clu'] = (empty($this->user->data[
'lastupdate']) ? $mc->msg(
"Unknown") : urlencode(trim($this->user->data[
'lastupdate'])));
248 $hbenv[
'lastupdate'] = (empty($this->user->data[
'lastupdate']) ?
"Unknown" : urlencode(trim($this->user->data[
'lastupdate'])));
249 $hbenv[
'Fplog'] = (empty($this->user->data[
'llog']) ? $mc->msg(
"None") : urlencode(trim($this->user->data[
'llog'])));
250 $hbenv[
'Fflog'] = (empty($this->user->data[
'flog']) ? $mc->msg(
"None") : urlencode(trim($this->user->data[
'flog'])));
251 $hbenv[
'Ffchg'] = (is_null($this->user->data[
'fchange']) ?
'N' : $this->user->data[
'fchange']);
252 $hbenv[
'Ffremain'] = (is_null($this->user->data[
'fremain']) || $this->user->data[
'fremain'] == 0 ? $this->cuAdmin->admininfo[
'grace'] : $this->user->data[
'fremain']);
253 $hbenv[
'Fmsg_tx'] = $this->user->data[
'msg_tx'];
254 $hbenv[
'Fset'] = $this->cuAdmin->admininfo[
'flagset'];
255 $hbenv[
'Fset2'] = $this->cuAdmin->admininfo[
'flagset2'];
256 $hbenv[
'Fset3'] = $this->cuAdmin->admininfo[
'flagset3'];
257 $hbenv[
'Fhdays'] = $this->cuAdmin->admininfo[
'fhdays'];
258 $hbenv[
'Ml'] = $this->user->data[
'email'];
259 $hbenv[
'Ffreset'] = $this->user->data[
'freset'];
262 $hbenv[
'savepass'] = $this->user->data[
'passwd'];
263 $hbenv[
'savemail'] = $this->user->data[
'email'];
266 $hbenv[
"sid"] = strval(time());
270 $baseCookie = BuildBaseSessionTicket($hbenv);
271 $mycookie =
"Ctime=$now&Cn={$this->user->data['user_name']}&Uid={$this->user->data['user_id']}&Ml=" . urlencode($this->user->data[
'email']) .
"&Ca=";
278 SetTicket($hbenv, $baseCookie, $mycookie);
The documentation for this class was generated from the following file: