.net - Get newly created member's ProviderUserKey -
i've got line works perfectly:
// membershipcreatestatus var createstatus = membershipservice.createuser(model.email, model.password);
now want provideruserkey
of member created. easiest way this?
i absolutely love this:
membershipuser member; // create new user , return status , member (if created). var createstatus = membershipservice.createuser(model.email, model.password, out member);
but i'll settle getting provideruserkey
.
can use provider specific api instead? if so, should able this. typically provider apis return new membershipuser instance, , have status out parameter createuser() method.
the membership.createuser() api returns membershipuser instance, see http://msdn.microsoft.com/en-us/library/d8t4h2es.aspx. can provideruserkey such:
membershipuser newuser = membershipservice.createuser(email, password, etc.); newuser.provideruserkey
Comments
Post a Comment