MemberStack.io

Member.id missing right after user updates profile

I’m using a webflow form to let users update their profiles.
The form auto populates its fields using ms-fields attributes.
After the user submits the form I’m redirecting them back to the homepage by setting the URL Redirect attribute to \index.html

Everything works fine.

However, once the homepage loads the the member.idthat’s supposed to come from the memberstack front end API is empty.

This is the code I’m using to get the member.id

window.addEventListener('DOMContentLoaded', (event) => {
	MemberStack.onReady.then(function(member) {
		if (member.loggedIn) {
			LoggedUserID = member.id;
			console.log(LoggedUserID);
		};
	})
});

It’s weird because the only time the member.id is empty is right after the form submission.

Hey Gus!

Can you check to see if you are overriding the member’s id anywhere in your form submission? For example, do you have a ms-field=id anywhere in the form?

Hi Tyler, I just checked my form and there’s no ms-field=id anywhere to be seen.