rewrite groupes functions in  user model

rewrite entities to use the new functions