The method ametys:groups() returns the identifier of the group. For groups in Mysql that returns '1', '2' .. It might be interesting to have the name.