In the frontend I choose this solution with the skeleton plugin
$db=JFactory::getDbo();
    		$query='UPDATE #__users SET name='.$db->quote($data['lastname']).' WHERE id='.$user->id;
    		$db->setQuery($query);
    		$db->execute();But how can i resolve this in the backend when an admin changes the profile of a user?

