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

Fonctions membres publiques

 __construct ($config=array(), MVCFactoryInterface $factory=null)
 
 getTable ($type='User', $prefix='Joomla\\CMS\\Table\\', $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 publiques hérités de AdminModel
 __construct ($config=array(), MVCFactoryInterface $factory=null, FormFactoryInterface $formFactory=null)
 
 batch ($commands, $pks, $contexts)
 
 checkin ($pks=array())
 
 checkout ($pk=null)
 
 delete (&$pks)
 
 getItem ($pk=null)
 
 publish (&$pks, $value=1)
 
 reorder ($pks, $delta=0)
 
 save ($data)
 
 saveorder ($pks=array(), $order=null)
 
 generateTitle ($categoryId, $table)
 
 initBatch ()
 
 editAssociations ($data)
 
- Fonctions membres publiques hérités de FormModel
 __construct ($config=array(), MVCFactoryInterface $factory=null, FormFactoryInterface $formFactory=null)
 
 checkin ($pk=null)
 
 checkout ($pk=null)
 
 validate ($form, $data, $group=null)
 
- Fonctions membres publiques hérités de BaseDatabaseModel
 __construct ($config=array(), MVCFactoryInterface $factory=null)
 
 getTable ($name='', $prefix='', $options=array())
 
 isCheckedOut ($item)
 
 getDbo ()
 
 setDbo (DatabaseInterface $db=null)
 
 __get ($name)
 
- Fonctions membres publiques hérités de BaseModel
 __construct ($config=array())
 
 getName ()
 
- Fonctions membres publiques hérités de CMSObject
 __construct ($properties=null)
 
 __toString ()
 
 def ($property, $default=null)
 
 get ($property, $default=null)
 
 getProperties ($public=true)
 
 getError ($i=null, $toString=true)
 
 getErrors ()
 
 set ($property, $value=null)
 
 setProperties ($properties)
 
 setError ($error)
 
- Fonctions membres publiques hérités de StatefulModelInterface
 getState ($property=null, $default=null)
 
 setState ($property, $value=null)
 
- Fonctions membres publiques hérités de DispatcherAwareInterface
 setDispatcher (DispatcherInterface $dispatcher)
 
- Fonctions membres publiques hérités de CurrentUserInterface
 setCurrentUser (User $currentUser)
 
- Fonctions membres publiques hérités de CacheControllerFactoryAwareInterface
 setCacheControllerFactory (CacheControllerFactoryInterface $factory)
 
- Fonctions membres publiques hérités de DatabaseAwareInterface
 setDatabase (DatabaseInterface $db)
 
- Fonctions membres publiques hérités de FormFactoryAwareInterface
 setFormFactory (FormFactoryInterface $factory)
 

Fonctions membres protégées

 loadFormData ()
 
 preprocessForm (Form $form, $data, $group='user')
 
- Fonctions membres protégées hérités de AdminModel
 batchAccess ($value, $pks, $contexts)
 
 batchCopy ($value, $pks, $contexts)
 
 cleanupPostBatchCopy (TableInterface $table, $newId, $oldId)
 
 batchLanguage ($value, $pks, $contexts)
 
 batchMove ($value, $pks, $contexts)
 
 batchTag ($value, $pks, $contexts)
 
 canDelete ($record)
 
 canEditState ($record)
 
 generateNewTitle ($categoryId, $alias, $title)
 
 getReorderConditions ($table)
 
 populateState ()
 
 prepareTable ($table)
 
 checkCategoryId ($categoryId)
 
 redirectToAssociations ($data)
 
- Fonctions membres protégées hérités de BaseDatabaseModel
 _getList ($query, $limitstart=0, $limit=0)
 
 _getListCount ($query)
 
 _createTable ($name, $prefix='Table', $config=array())
 
 bootComponent ($component)
 
 dispatchEvent (EventInterface $event)
 

Attributs protégés

 $_item = null
 
- Attributs protégés hérités de AdminModel
 $text_prefix = null
 
 $event_after_delete = null
 
 $event_after_save = null
 
 $event_before_delete = null
 
 $event_before_save = null
 
 $event_before_change_state = null
 
 $event_change_state = null
 
 $event_before_batch = null
 
 $batch_copymove = 'category_id'
 
 $batch_commands
 
 $associationsContext = null
 
 $batchSet = null
 
 $user = null
 
 $table = null
 
 $tableClassName = null
 
 $contentType = null
 
 $type = null
 
- Attributs protégés hérités de FormModel
 $events_map = null
 
- Attributs protégés hérités de BaseDatabaseModel
 $option = null
 
 $event_clean_cache = null
 
- Attributs protégés hérités de BaseModel
 $name
 
- Attributs protégés hérités de CMSObject
 $_errors = array()
 

Membres hérités additionnels

- Fonctions membres publiques statiques hérités de BaseModel
static addIncludePath ($path='', $prefix='')
 
- Champs de données hérités de AdminModel
 $typeAlias
 
- Attributs protégés statiques hérités de BaseModel
static $paths
 

Description détaillée

User model.

Depuis
1.6

Documentation des constructeurs et destructeur

◆ __construct()

__construct (   $config = array(),
MVCFactoryInterface  $factory = null 
)

Constructor.

Paramètres
array$configAn optional associative array of configuration settings.
MVCFactoryInterface$factoryThe factory.
Voir également
Depuis
3.2

Références $config, et Symfony\Contracts\Service\__construct().

Documentation des fonctions membres

◆ activate()

activate ( $pks)

Method to activate user records.

Paramètres
array&$pksThe ids of the items to activate.
Renvoie
boolean True on success.
Depuis
1.6
Exceptions

Références $i, $result, $user, Text\_(), Access\check(), elseif, Factory\getApplication(), Factory\getUser(), PluginHelper\importPlugin(), et null.

◆ batch()

batch (   $commands,
  $pks,
  $contexts 
)

Method to perform batch operations on an item or a set of items.

Paramètres
array$commandsAn array of commands to perform.
array$pksAn array of item ids.
array$contextsAn array of item contexts.
Renvoie
boolean Returns true on success, false on failure.
Depuis
2.5

Références Text\_(), ArrayHelper\getValue(), et ArrayHelper\toInteger().

◆ batchReset()

batchReset (   $userIds,
  $action 
)

Batch flag users as being required to reset their passwords

Paramètres
array$userIdsAn array of user IDs on which to operate
string$actionThe action to perform
Renvoie
boolean True on success, false on failure
Depuis
3.2

Références $db, $query, $value, Text\_(), UserHelper\checkSuperUserInUsers(), Joomla\Database\getDatabase(), Factory\getUser(), ParameterType\INTEGER, et ArrayHelper\toInteger().

◆ batchUser()

batchUser (   $groupId,
  $userIds,
  $action 
)

Perform batch operations

Paramètres
integer$groupIdThe group ID which assignments are being edited
array$userIdsAn array of user IDs on which to operate
string$actionThe action to perform
Renvoie
boolean True on success, false on failure
Depuis
1.6

Références $db, $groups, $id, $query, Text\_(), Access\checkGroup(), UserHelper\checkSuperUserInUsers(), Joomla\Database\getDatabase(), Factory\getUser(), ParameterType\INTEGER, et ArrayHelper\toInteger().

◆ block()

block ( $pks,
  $value = 1 
)

Method to block user records.

Paramètres
array&$pksThe ids of the items to publish.
integer$valueThe value of the published state
Renvoie
boolean True on success.
Depuis
1.6
Exceptions

Références $app, $i, $options, $result, $user, $value, Text\_(), Access\check(), elseif, Factory\getApplication(), Factory\getUser(), PluginHelper\importPlugin(), et null.

◆ delete()

delete ( $pks)

Method to delete rows.

Paramètres
array&$pksAn array of item ids.
Renvoie
boolean Returns true on success, false on failure.
Depuis
1.6
Exceptions

Références $i, $user, Text\_(), Access\check(), Factory\getApplication(), Factory\getUser(), et PluginHelper\importPlugin().

◆ generateOteps()

generateOteps (   $userId,
  $count = 10 
)

No longer used

Paramètres
integer$userIdIgnored
integer$countIgnored
Renvoie
array Empty array
Depuis
3.2
Obsolète:
4.2.0 Wil be removed in 5.0.

◆ getAssignedGroups()

getAssignedGroups (   $userId = null)

Gets the groups this object is assigned to

Paramètres
integer$userIdThe user ID to retrieve the groups for
Renvoie
array An array of assigned groups
Depuis
1.6

Références $form, $params, $result, $userId, ComponentHelper\getParams(), Joomla\CMS\MVC\Model\getState(), et UserHelper\getUserGroups().

◆ getForm()

getForm (   $data = array(),
  $loadData = true 
)

Method to get the record form.

Paramètres
array$dataAn optional array of data for the form to interrogate.
boolean$loadDataTrue if the form is to load its own data (default case), false if not.
Renvoie
Form|bool A Form object on success, false on failure
Depuis
1.6

If users without core.manage permission editing their own account, remove some fields which they should not be allowed to change and prevent them to change user name if configured

Implémente FormModelInterface.

Références $form, $user, $userId, ComponentHelper\getParams(), Factory\getUser(), Multilanguage\isEnabled(), et Joomla\CMS\MVC\Model\loadForm().

◆ getGroups()

getGroups ( )

Gets the available groups.

Renvoie
array An array of groups
Depuis
1.6

Références $model, $user, Factory\getUser(), et null.

◆ getItem()

getItem (   $pk = null)

Method to get a single record.

Paramètres
integer$pkThe id of the primary key.
Renvoie
mixed Object on success, false on failure.
Depuis
1.6

Références Joomla\CMS\MVC\Model\getState(), et null.

◆ getOtpConfig()

getOtpConfig (   $userId = null)

No longer used

Paramètres
integer$userIdIgnored
Renvoie
Depuis
3.2
Obsolète:
4.2.0 Will be removed in 5.0

◆ getOtpConfigEncryptionKey()

getOtpConfigEncryptionKey ( )

No longer used

Renvoie
string
Depuis
3.2
Obsolète:
4.2.0 Will be removed in 5.0

Références Factory\getApplication().

◆ getTable()

getTable (   $type = 'User',
  $prefix = 'Joomla\\CMS\\Table\\',
  $config = array() 
)

Returns a reference to the a Table object, always creating it.

Paramètres
string$typeThe table type to instantiate
string$prefixA prefix for the table class name. Optional.
array$configConfiguration array for model. Optional.
Renvoie
Table A database object
Depuis
1.6

Références $config, $prefix, $type, et Table\getInstance().

◆ getTwofactorform()

getTwofactorform (   $userId = null)

No longer used

Paramètres
integer$userIdIgnored
Renvoie
array Empty array
Depuis
3.2
Exceptions

◆ isValidOtep()

isValidOtep (   $userId,
  $otep,
  $otpConfig = null 
)

No longer used

Paramètres
integer$userIdIgnored
string$otepIgnored
object$otpConfigIgnored
Renvoie
boolean Always true
Depuis
3.2
Obsolète:
4.2.0 Will be removed in 5.0

◆ isValidSecretKey()

isValidSecretKey (   $userId,
  $secretKey,
  $options = array() 
)

No longer used. Always returns true.

Paramètres
integer$userIdIgnored
string$secretKeyIgnored
array$optionsIgnored
Renvoie
boolean Always true
Depuis
3.2
Exceptions

◆ loadFormData()

loadFormData ( )
protected

Method to get the data that should be injected in the form.

Renvoie
mixed The data for the form.
Depuis
1.6
Exceptions

Références $data, Factory\getApplication(), et Joomla\CMS\MVC\Model\preprocessData().

◆ preprocessForm()

preprocessForm ( Form  $form,
  $data,
  $group = 'user' 
)
protected

Override Joomla::preprocessForm to ensure the correct plugin group is loaded.

Paramètres
Form$formA Form object.
mixed$dataThe data expected for the form.
string$groupThe name of the plugin group to import (defaults to "content").
Renvoie
void
Depuis
1.6
Exceptions

Références $data, $form, et Joomla\CMS\MVC\Model\preprocessForm().

◆ save()

save (   $data)

Method to save the form data.

Paramètres
array$dataThe form data.
Renvoie
boolean True on success.
Depuis
1.6
Exceptions

Références $data, $user, Text\_(), Access\checkGroup(), Factory\getApplication(), User\getInstance(), Joomla\CMS\MVC\Model\getState(), Factory\getUser(), null, et Joomla\CMS\MVC\Model\setState().

◆ setOtpConfig()

setOtpConfig (   $userId,
  $otpConfig 
)

No longer used

Paramètres
integer$userIdIgnored
\stdClass$otpConfigIgnored
Renvoie
boolean True on success
Depuis
3.2
Obsolète:
4.2.0 Will be removed in 5.0

Documentation des champs

◆ $_item

$_item = null
protected

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