[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/plugins/user/joomla/ -> joomla.php (summary)

(no description)

Copyright: (C) 2006 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
File Size: 505 lines (17 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

PlgUserJoomla:: (8 methods):
  onContentPrepareForm()
  onUserAfterDelete()
  onUserAfterSave()
  onUserLogin()
  onUserLogout()
  onUserAfterLogin()
  disableMfaOnSilentLogin()
  _getUser()


Class: PlgUserJoomla  - X-Ref

Joomla User plugin

onContentPrepareForm($form, $data)   X-Ref
Set as required the passwords fields when mail to user is set to No

param: \Joomla\CMS\Form\Form  $form  The form to be altered.
param: mixed                  $data  The associated data for the form.
return: boolean

onUserAfterDelete($user, $success, $msg)   X-Ref
Remove all sessions for the user name

Method is called after user data is deleted from the database

param: array    $user     Holds the user data
param: boolean  $success  True if user was successfully stored in the database
param: string   $msg      Message
return: void

onUserAfterSave($user, $isnew, $success, $msg)   X-Ref
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: array    $user     Holds the new user data.
param: boolean  $isnew    True if a new user is stored.
param: boolean  $success  True if user was successfully stored in the database.
param: string   $msg      Message.
return: void

onUserLogin($user, $options = [])   X-Ref
This method should handle any login logic and report back to the subject

param: array  $user     Holds the user data
param: array  $options  Array holding options (remember, autoregister, group)
return: boolean  True on success

onUserLogout($user, $options = [])   X-Ref
This method should handle any logout logic and report back to the subject

param: array  $user     Holds the user data.
param: array  $options  Array holding options (client, ...).
return: boolean  True on success

onUserAfterLogin(array $options)   X-Ref
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: array  $options  Passed by Joomla. user: a User object; responseType: string, authentication response type.
return: void

disableMfaOnSilentLogin(array $options)   X-Ref
Detect silent logins and disable MFA if the relevant com_users option is set.

param: array  $options  The array of login options and login result
return: void

_getUser($user, $options = [])   X-Ref
This method will return a user object

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

param: array  $user     Holds the user data.
param: array  $options  Array holding options (remember, autoregister, group).
return: User



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer