Bonjour je voudrais lancer un script quand un utilisateur supprime son compte ou change son mots de passe dans Joomla es ce possible ?
Je suis sous joomla3
Merci d'avance.
Je suis sous joomla3
Merci d'avance.
/**
* Returns userid if a user exists
*
* @param string $username The username to search on.
*
* @return integer The user id or 0 if not found.
*
* @since 11.1
*/
public static function getUserId($username)
{
// Initialise some variables
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select($db->quoteName('id'))
->from($db->quoteName('#__users'))
->where($db->quoteName('username') . ' = ' . $db->quote($username));
$db->setQuery($query, 0, 1);
return $db->loadResult();
}
/**
* Function that allows child controller access to model data after the data has been saved.
*
* @param JModelLegacy $model The data model object.
* @param array $validData The validated data.
*
* @return void
* @since 3.1
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
Commentaire