public Auth_UserModel EditUser(Auth_EditUserModel editUser, int userID)
        {
            Auth_UserModel beforeUpdateUserData = authQuery.GetUsersData(userID);
            Auth_UserModel user = UserModelConverter.EditUserModel_To_UserModel(editUser);

            // this fields are not allwed to be changed here.
            user.userID          = beforeUpdateUserData.userID;
            user.googleSubjectID = beforeUpdateUserData.googleSubjectID;
            user.isAdmin         = beforeUpdateUserData.isAdmin;

            // if they fields are empty, populate with old data.
            if (string.IsNullOrEmpty(user.username))
            {
                user.username = beforeUpdateUserData.username;
            }
            if (string.IsNullOrEmpty(user.firstname))
            {
                user.firstname = beforeUpdateUserData.firstname;
            }
            if (string.IsNullOrEmpty(user.lastname))
            {
                user.lastname = beforeUpdateUserData.lastname;
            }
            if (string.IsNullOrEmpty(user.email))
            {
                user.email = beforeUpdateUserData.email;
            }
            if (string.IsNullOrEmpty(user.password))
            {
                user.password = beforeUpdateUserData.password;
            }
            else
            {
                user.password = Hash.HashPassword(user.password);
            }

            // Database interaction
            authQuery.EditUser(user);
            // Return the user
            return(user);
        }
        public int CreateNewUserUsingRegisterModel(Auth_RegisterUserModel newUser)
        {
            Auth_UserModel user = UserModelConverter.RegisterUserModel_To_UserModel(newUser);

            return(authQuery.CreateNewUser(user));
        }