Galette API documentation
Gestionnaire d’Adhérents en Ligne Extrêmement Tarabiscoté mais Tellement Efficace
1.0.0
Galette\Core\Authentication Class Reference
Inheritance diagram for Galette\Core\Authentication:

Public Member Functions

 logIn (string $user, string $passe)
 
 loginExists (string $user)
 
 logAdmin (string $login, Preferences $preferences)
 
 logCron (string $name, Preferences $preferences)
 
 logOut ()
 
 isLogged ()
 
 isAdmin ()
 
 isSuperAdmin ()
 
 isActive ()
 
 isStaff ()
 
 isCron ()
 
 isGroupManager (array|int $id_group=null)
 
 getManagedGroups ()
 
 getCompactMenu ()
 
 isDarkModeEnabled ()
 
 isUp2Date ()
 
 loggedInAs (bool $only_name=false)
 
 __get (string $name)
 
 __isset (string $name)
 
 getAccessLevel ()
 

Public Attributes

const ACCESS_PUBLIC = -1
 
const ACCESS_USER = 0
 
const ACCESS_MANAGER = 1
 
const ACCESS_STAFF = 2
 
const ACCESS_ADMIN = 3
 
const ACCESS_SUPERADMIN = 4
 

Protected Attributes

string $login
 
string $name
 
string $surname
 
bool $admin = false
 
int $id
 
string $lang
 
bool $logged = false
 
bool $active = false
 
bool $superadmin = false
 
bool $staff = false
 
bool $uptodate = false
 
array $managed_groups = []
 
bool $cron = false
 

Member Function Documentation

◆ __get()

Galette\Core\Authentication::__get ( string  $name)

Global getter method

Parameters
string$namename of the property we want to retrieve
Returns
mixed

◆ __isset()

Galette\Core\Authentication::__isset ( string  $name)

Global isset method Required for twig to access properties via __get

Parameters
string$namename of the property we want to retrieve
Returns
bool

◆ getAccessLevel()

Galette\Core\Authentication::getAccessLevel ( )

get user access level

Returns
integer

◆ getCompactMenu()

Galette\Core\Authentication::getCompactMenu ( )

Get compact menu mode

Returns
bool

◆ getManagedGroups()

Galette\Core\Authentication::getManagedGroups ( )

Get managed groups

Returns
array<int, Group|int>

◆ isActive()

Galette\Core\Authentication::isActive ( )

Is user active?

Returns
bool

◆ isAdmin()

Galette\Core\Authentication::isAdmin ( )

Is user admin?

Returns
bool

◆ isCron()

Galette\Core\Authentication::isCron ( )

is user a crontab?

Returns
bool

◆ isDarkModeEnabled()

Galette\Core\Authentication::isDarkModeEnabled ( )

Is dark mode enabled?

Returns
bool

◆ isGroupManager()

Galette\Core\Authentication::isGroupManager ( array|int  $id_group = null)

Is user a group manager? If no group id is specified, check if user is manager for at least one group.

Parameters
array<int>|int$id_group Group(s) identifier(s)
Returns
boolean

◆ isLogged()

Galette\Core\Authentication::isLogged ( )

Is user logged-in?

Returns
bool

◆ isStaff()

Galette\Core\Authentication::isStaff ( )

Is user member of staff?

Returns
bool

◆ isSuperAdmin()

Galette\Core\Authentication::isSuperAdmin ( )

Is user super admin?

Returns
bool

◆ isUp2Date()

Galette\Core\Authentication::isUp2Date ( )

Is user currently up to date? An up-to-date member is active and either due free, or with up-to-date subscription

Returns
bool

◆ logAdmin()

Galette\Core\Authentication::logAdmin ( string  $login,
Preferences  $preferences 
)

Login for the superuser

Parameters
string$loginname
Preferences$preferencesPreferences instance
Returns
bool

Reimplemented in Galette\Core\Login.

◆ logCron()

Galette\Core\Authentication::logCron ( string  $name,
Preferences  $preferences 
)
abstract

Authenticate from cron

Parameters
string$nameService name
Preferences$preferencesPreferences instance
Returns
bool

Reimplemented in Galette\Core\Login.

◆ loggedInAs()

Galette\Core\Authentication::loggedInAs ( bool  $only_name = false)

Display logged in member name

Parameters
boolean$only_nameIf we want only the name without any additional text
Returns
string

◆ logIn()

Galette\Core\Authentication::logIn ( string  $user,
string  $passe 
)
abstract

Logs in user.

Parameters
string$useruser's login
string$passeuser's password
Returns
boolean

Reimplemented in Galette\Core\Login.

◆ loginExists()

Galette\Core\Authentication::loginExists ( string  $user)
abstract

Does this login already exists ? These function should be used for setting admin login into Preferences

Parameters
string$userthe username
Returns
boolean true if the username already exists, false otherwise

Reimplemented in Galette\Core\Login.

◆ logOut()

Galette\Core\Authentication::logOut ( )

Log out user and unset variables

Returns
bool

Reimplemented in Galette\Core\Login.


The documentation for this class was generated from the following file: