File manager - Edit - /home/autoph/public_html/projects/api/app/Utilities/Auth.php
Back
<?php namespace App\Utilities; use App\Utilities\Session; class Auth { private static $instance; function __construct() { if (!empty(Session::get('uid'))) { $user = new \App\Models\User; $response = $user->getUser(array(Session::get('uid'))); foreach ($response as $key => $value) { $this->{$key} = $value; } } } public static function check() { if (!empty(Session::get('uid'))) { return true; } return false; } public static function user() { if (is_null(self::$instance)) { self::$instance = new self(); } return self::$instance; } }
| ver. 1.4 |
.
| PHP 8.0.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings