Fixed copy-pasta mistake, and made updateUserDetails version of code simpler