moved logic from table to model in com_uaudit