Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Référence de la classe PlgUserJoomla
+ Graphe d'héritage de PlgUserJoomla:

Fonctions membres publiques

 onContentPrepareForm ($form, $data)
 
 onUserAfterDelete ($user, $success, $msg)
 
 onUserAfterSave ($user, $isnew, $success, $msg)
 
 onUserLogin ($user, $options=[])
 
 onUserLogout ($user, $options=[])
 
 onUserAfterLogin (array $options)
 
- Fonctions membres publiques hérités de CMSPlugin
 __construct (&$subject, $config=array())
 
 loadLanguage ($extension='', $basePath=JPATH_ADMINISTRATOR)
 
 setApplication (CMSApplicationInterface $application)
 
- Fonctions membres publiques hérités de DispatcherAwareInterface
 setDispatcher (DispatcherInterface $dispatcher)
 
- Fonctions membres publiques hérités de PluginInterface
 registerListeners ()
 

Fonctions membres protégées

 _getUser ($user, $options=[])
 
- Fonctions membres protégées hérités de CMSPlugin
 registerLegacyListener (string $methodName)
 
 registerListener (string $methodName)
 
 getApplication ()
 

Attributs protégés

 $app
 
 $db
 
- Attributs protégés hérités de CMSPlugin
 $_name = null
 
 $_type = null
 
 $autoloadLanguage = false
 
 $allowLegacyListeners = true
 

Membres hérités additionnels

- Champs de données hérités de CMSPlugin
 $params = null
 

Description détaillée

Joomla User plugin

Depuis
1.5

Documentation des fonctions membres

◆ _getUser()

_getUser (   $user,
  $options = [] 
)
protected

This method will return a user object

If options['autoregister'] is true, if the user doesn't exist yet they will be created

Paramètres
array$userHolds the user data.
array$optionsArray holding options (remember, autoregister, group).
Renvoie
User
Depuis
1.5

Références $id, $options, $params, $user, User\getInstance(), et ComponentHelper\getParams().

◆ onContentPrepareForm()

onContentPrepareForm (   $form,
  $data 
)

Set as required the passwords fields when mail to user is set to No

Paramètres
\Joomla\CMS\Form\Form$formThe form to be altered.
mixed$dataThe associated data for the form.
Renvoie
boolean
Depuis
4.0.0

Références $data, $form, $name, et Factory\getApplication().

◆ onUserAfterDelete()

onUserAfterDelete (   $user,
  $success,
  $msg 
)

Remove all sessions for the user name

Method is called after user data is deleted from the database

Paramètres
array$userHolds the user data
boolean$successTrue if user was successfully stored in the database
string$msgMessage
Renvoie
void
Depuis
1.6

Références $query, $user, et $userId.

◆ onUserAfterLogin()

onUserAfterLogin ( array  $options)

Hooks on the Joomla! login event. Detects silent logins and disables the Multi-Factor Authentication page in this case.

Moreover, it will save the redirection URL and the Captive URL which is necessary in Joomla 4. You see, in Joomla 4 having unified sessions turned on makes the backend login redirect you to the frontend of the site AFTER logging in, something which would cause the Captive page to appear in the frontend and redirect you to the public frontend homepage after successfully passing the Two Step verification process.

Paramètres
array$optionsPassed by Joomla. user: a User object; responseType: string, authentication response type.
Renvoie
void
Depuis
4.2.0

Références $options.

◆ onUserAfterSave()

onUserAfterSave (   $user,
  $isnew,
  $success,
  $msg 
)

Utility method to act on a user after it has been saved.

This method sends a registration email to new users created in the backend.

Paramètres
array$userHolds the new user data.
boolean$isnewTrue if a new user is stored.
boolean$successTrue if user was successfully stored in the database.
string$msgMessage.
Renvoie
void
Depuis
1.6

Look for user language. Priority:

  1. User frontend language
  2. User backend language

Références $data, $language, $user, class, Joomla\DI\getContainer(), et Factory\getLanguage().

◆ onUserLogin()

onUserLogin (   $user,
  $options = [] 
)

This method should handle any login logic and report back to the subject

Paramètres
array$userHolds the user data
array$optionsArray holding options (remember, autoregister, group)
Renvoie
boolean True on success
Depuis
1.5

Références $options, $query, $result, $user, et true.

◆ onUserLogout()

onUserLogout (   $user,
  $options = [] 
)

This method should handle any logout logic and report back to the subject

Paramètres
array$userHolds the user data.
array$optionsArray holding options (client, ...).
Renvoie
boolean True on success
Depuis
1.5

Références $clientId, $options, $this, $user, Joomla\Application\getSession(), Factory\getUser(), et null.

Documentation des champs

◆ $app

$app
protected

◆ $db

$db
protected

La documentation de cette classe a été générée à partir du fichier suivant :