getUser() method to controllers