Added getName function to User model