Joomla CMS
3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
|
Fonctions membres publiques | |
__construct ($config=array()) | |
getTable ($type='User', $prefix='JTable', $config=array()) | |
getItem ($pk=null) | |
getForm ($data=array(), $loadData=true) | |
save ($data) | |
delete (&$pks) | |
block (&$pks, $value=1) | |
activate (&$pks) | |
batch ($commands, $pks, $contexts) | |
batchReset ($userIds, $action) | |
batchUser ($groupId, $userIds, $action) | |
getGroups () | |
getAssignedGroups ($userId=null) | |
getOtpConfig ($userId=null) | |
setOtpConfig ($userId, $otpConfig) | |
getOtpConfigEncryptionKey () | |
getTwofactorform ($userId=null) | |
generateOteps ($userId, $count=10) | |
isValidSecretKey ($userId, $secretKey, $options=array()) | |
isValidOtep ($userId, $otep, $otpConfig=null) | |
Fonctions membres protégées | |
loadFormData () | |
preprocessForm (JForm $form, $data, $group='user') | |
Attributs protégés | |
$_item = null | |
User model.
__construct | ( | $config = array() | ) |
Constructor.
array | $config | An optional associative array of configuration settings. |
Références $config.
activate | ( | & | $pks | ) |
Method to activate user records.
array | &$pks | The ids of the items to activate. |
Références $dispatcher, $i, $user, elseif, JEventDispatcher\getInstance(), User\getTable(), null, et JError\raiseWarning().
batch | ( | $commands, | |
$pks, | |||
$contexts | |||
) |
Method to perform batch operations on an item or a set of items.
array | $commands | An array of commands to perform. |
array | $pks | An array of item ids. |
array | $contexts | An array of item contexts. |
Références ArrayHelper\getValue(), et ArrayHelper\toInteger().
batchReset | ( | $userIds, | |
$action | |||
) |
Batch flag users as being required to reset their passwords
array | $userIds | An array of user IDs on which to operate |
string | $action | The action to perform |
Références $action, $db, $query, $value, et ArrayHelper\toInteger().
batchUser | ( | $groupId, | |
$userIds, | |||
$action | |||
) |
Perform batch operations
integer | $groupId | The group ID which assignments are being edited |
array | $userIds | An array of user IDs on which to operate |
string | $action | The action to perform |
Références $action, $db, $groups, $id, $query, $users, et ArrayHelper\toInteger().
block | ( | & | $pks, |
$value = 1 |
|||
) |
Method to block user records.
array | &$pks | The ids of the items to publish. |
integer | $value | The value of the published state |
Références $app, $dispatcher, $i, $options, $user, $value, UserHelper\destroyUserSessions(), elseif, JEventDispatcher\getInstance(), User\getTable(), null, et JError\raiseWarning().
delete | ( | & | $pks | ) |
Method to delete rows.
array | &$pks | An array of item ids. |
Références $dispatcher, $i, $user, JEventDispatcher\getInstance(), User\getTable(), et JError\raiseWarning().
generateOteps | ( | $userId, | |
$count = 10 |
|||
) |
Generates a new set of One Time Emergency Passwords (OTEPs) for a given user.
integer | $userId | The user ID |
integer | $count | How many OTEPs to generate? Default: 10 |
Références $base, $count, $i, et $userId.
Référencé par AdminModelProfile\generateOteps().
getAssignedGroups | ( | $userId = null | ) |
getForm | ( | $data = array() , |
|
$loadData = true |
|||
) |
getGroups | ( | ) |
getItem | ( | $pk = null | ) |
Method to get a single record.
integer | $pk | The id of the primary key. |
Références null.
getOtpConfig | ( | $userId = null | ) |
Returns the one time password (OTP) – a.k.a. two factor authentication – configuration for a particular user.
integer | $userId | The numeric ID of the user |
Get the raw data, without going through JUser (required in order to be able to modify the user record before logging in the user).
Références $config, $db, $item, $key, $query, $userId, et null.
Référencé par AdminModelProfile\getOtpConfig(), UsersModelProfile\getOtpConfig(), et UsersModelProfile\getTwofactorform().
getOtpConfigEncryptionKey | ( | ) |
Gets the symmetric encryption key for the OTP configuration data. It currently returns the site's secret.
getTable | ( | $type = 'User' , |
|
$prefix = 'JTable' , |
|||
$config = array() |
|||
) |
Returns a reference to the a Table object, always creating it.
string | $type | The table type to instantiate |
string | $prefix | A prefix for the table class name. Optional. |
array | $config | Configuration array for model. Optional. |
getTwofactorform | ( | $userId = null | ) |
Gets the configuration forms for all two-factor authentication methods in an array.
integer | $userId | The user ID to load the forms for (optional) |
Références $userId, et FOFPlatform\getInstance().
Référencé par AdminModelProfile\getTwofactorform().
isValidOtep | ( | $userId, | |
$otep, | |||
$otpConfig = null |
|||
) |
Checks if the supplied string is a valid one time emergency password (OTEP) for this user. If it is it will be automatically removed from the user's list of OTEPs.
integer | $userId | The user ID against which you are checking |
string | $otep | The string you want to test for validity |
object | $otpConfig | Optional; the two factor authentication configuration (automatically fetched if not set) |
Two factor authentication enabled and no OTEPs defined. The user has used them all up. Therefore anything they enter is an invalid OTEP.
isValidSecretKey | ( | $userId, | |
$secretKey, | |||
$options = array() |
|||
) |
Checks if the provided secret key is a valid two factor authentication secret key. If not, it will check it against the list of one time emergency passwords (OTEPs). If it's a valid OTEP it will also remove it from the user's list of OTEPs.
This method will return true in the following conditions:
You can define the following options in the $options array: otp_config The OTP (one time password, a.k.a. two factor auth) configuration object. If not set we'll load it automatically. warn_if_not_req Issue a warning if you are checking a secret key against a user account which doesn't have any two factor authentication method enabled. warn_irq_msg The string to use for the warn_if_not_req warning
integer | $userId | The user's numeric ID |
string | $secretKey | The secret key you want to check |
array | $options | Options; see above |
Références $app, $check, $extension, $lang, $options, $userId, FOFPlatform\getInstance(), JPATH_ADMINISTRATOR, et null.
|
protected |
Method to get the data that should be injected in the form.
Références $data.
|
protected |
Override JModelAdmin::preprocessForm to ensure the correct plugin group is loaded.
JForm | $form | A JForm object. |
mixed | $data | The data expected for the form. |
string | $group | The name of the plugin group to import (defaults to "content"). |
Exception | if there is an error in the form event. |
save | ( | $data | ) |
Method to save the form data.
array | $data | The form data. |
Références $data, $user, UserHelper\destroyUserSessions(), FOFPlatform\getInstance(), et null.
setOtpConfig | ( | $userId, | |
$otpConfig | |||
) |
Sets the one time password (OTP) – a.k.a. two factor authentication – configuration for a particular user. The $otpConfig object is the same as the one returned by the getOtpConfig method.
integer | $userId | The numeric ID of the user |
stdClass | $otpConfig | The OTP configuration object |
Références $db, $key, $userId, et json_encode.
Référencé par AdminModelProfile\setOtpConfig().
|
protected |