english/plugins/user/profile/profile.php
/**
	 * Remove all user profile information for the given user ID
	 *
	 * 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 succesfully stored in the database
	 * @param	string		$msg		Message
	 */
Remove all user profile information for the given user ID
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 succesfully stored in the database
@param       string          $msg            Message
Remove all user profile information for the given user ID 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 succesfully stored in the database @param string $msg Message
function onUserAfterDelete($user, $success, $msg)
	{
		if (!$success) {
			return false;
		}
		$userId	= JArrayHelper::getValue($user, 'id', 0, 'int');
		if ($userId)
		{
			try
			{
				$db = JFactory::getDbo();
				$db->setQuery(
					'DELETE FROM #__user_profiles WHERE user_id = '.$userId .
					" AND profile_key LIKE 'profile.%'"
				);
				if (!$db->query()) {
					throw new Exception($db->getErrorMsg());
				}
			}
			catch (JException $e)
			{
				$this->_subject->setError($e->getMessage());
				return false;
			}
		}
		return true;
	}
function onUserAfterDelete ( $ user , $ success , $ msg ) { if ( ! $ success ) { return false ; } $ userId = JArrayHelper :: getValue ( $ user , 'id' , 0 , 'int' ) ; if ( $ userId ) { try { $ db = JFactory :: getDbo ( ) ; $ db -> setQuery ( 'DELETE FROM #__user_profiles WHERE user_id = ' . $ userId . "  AND profile_key LIKE 'profile.%' " ) ; if ( ! $ db -> query ( ) ) { throw new Exception ( $ db -> getErrorMsg ( ) ) ; } } catch ( JException $ e ) { $ this -> _subject -> setError ( $ e -> getMessage ( ) ) ; return false ; } } return true ; }
Remove all user profile information for the given user ID
 Method is called after user data is deleted from the database
Remove all user profile information for the given user ID Method is called after user data is deleted from the database