function triggerProfileUpdate($user, &$data, $changed, $isNew)
{
$user_id = $user->id;
$uniqueid = "CH" . substr(uniqid($data['lastname'], true), -5, 5);
$db = JFactory::getDbo();
$query = 'UPDATE #__jsn_users SET uniqueid = ' . $db->quote($uniqueid) . ' WHERE id = ' . $user_id;
$db->setQuery($query);
$db->execute();
}
for some reasons nothing is writing to the database.. i tryied also with $db->quote("hhh" but not working... any idea?