License: MIT

Language: PHP


Class to authentification users. Should be used with panx-framework.


composer require alexkratky/authx


The panx-framework support authentification by default using Auth class. All routes are located in auth.php, all template files in /template/auth/, all CSS files in /res/css/auth/. Auth class is included automatically. Auth class will auto login user, if there are valid cookies. You can check if user is logined using AuthMiddleware or by function isLogined(): bool. You can access all user data (except password), using user($data) function, for example:

$name = $auth->user('name');
$id = $auth->user('id');
$mail = $auth->user('mail');

The argument in user() is case insensitive and have multiple aliases, e.g. you can use user('email') or user('mail').

To work with Auth class, you need to setup DB connection and run command php panx-worker create auth

Also, you need to setup following things in .config:

LOGOUT_PAGE = /login
; The google recaptcha is needed to prevent from brutal force attacks

Project Statistics

Sourcerank 3
Repository Size 6.84 KB
Stars 0
Forks 0
Watchers 1
Open issues 0
Dependencies 6
Contributors 1
Tags 1
Last updated
Last pushed

Top Contributors See all

Alex Krátký

Packages Referencing this Repo

Class to authentification users.
Latest release v0.1.0 - Published

Recent Tags See all

v0.1.0 September 13, 2019

Something wrong with this page? Make a suggestion

Last synced: 2019-09-14 07:17:15 UTC

Login to resync this repository