Removed duplicate $user object creation in user register method. #2288