fix User class to use uid column in SQL queries