move database call in users manager