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

Public Member Functions

 __construct (Db $zdb, I18n $i18n)
 
 logAdmin (string $login, Preferences $preferences)
 
 logCron (string $name, Preferences $preferences)
 
 logOut ()
 
 logIn (string $user, string $passe)
 
 impersonate (int $id)
 
 loginExists (string $user)
 
 isImpersonated ()
 
 setId (int $id)
 
- Public Member Functions inherited from Galette\Core\Authentication
 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 TABLE = Adherent::TABLE
 
const PK = 'login_adh'
 
- Public Attributes inherited from Galette\Core\Authentication
const ACCESS_PUBLIC = -1
 
const ACCESS_USER = 0
 
const ACCESS_MANAGER = 1
 
const ACCESS_STAFF = 2
 
const ACCESS_ADMIN = 3
 
const ACCESS_SUPERADMIN = 4
 

Additional Inherited Members

- Protected Attributes inherited from Galette\Core\Authentication
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
 

Detailed Description

Default authentication class for galette

Author
Johan Cwiklinski johan.nosp@m.@x-t.nosp@m.nd.be

Constructor & Destructor Documentation

◆ __construct()

Galette\Core\Login::__construct ( Db  $zdb,
I18n  $i18n 
)

Instanciate object

Parameters
Db$zdbDatabase instance
I18n$i18nI18n instance

Member Function Documentation

◆ impersonate()

Galette\Core\Login::impersonate ( int  $id)

Impersonate user

Parameters
int$idMember ID
Returns
bool

◆ isImpersonated()

Galette\Core\Login::isImpersonated ( )

Is impersonated

Returns
bool

◆ logAdmin()

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

Login for the superuser

Parameters
string$loginname
Preferences$preferencesPreferences instance
Returns
bool

Reimplemented from Galette\Core\Authentication.

◆ logCron()

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

Authenticate from cron

Parameters
string$nameService name
Preferences$preferencesPreferences instance
Returns
bool

Reimplemented from Galette\Core\Authentication.

◆ logIn()

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

Logs in user.

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

Reimplemented from Galette\Core\Authentication.

◆ loginExists()

Galette\Core\Login::loginExists ( string  $user)

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

Parameters
string$userthe username
Returns
bool

Reimplemented from Galette\Core\Authentication.

◆ logOut()

Galette\Core\Login::logOut ( )

Log out user and unset variables

Returns
bool

Reimplemented from Galette\Core\Authentication.

◆ setId()

Galette\Core\Login::setId ( int  $id)

Set id

Parameters
int$idID to set
Returns
$this

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