In my current setup I create new users from Microsoft Crm, when a certain entity (contact) is created I add users to the database directly (in the membership and users tables). I also have code to take care of authorization and roles.
At the moment I am trying to write code that makes it possible to change a users Email address. Again I update both tables in SQL. This makes it possible to login with a different Email while still being the "same" user.
This does not work for permissions though. It seems like the user loses all permissions from lists with unique permissions. I can however go to the list in sharepoint and add the new email address manually. If I do this I also need to delete the old mail reference.
How can I change a users Email address and at the same time retain it's permissions? Is this possible? Or do I need to find a way to "copy" over all the existing permissions from one mail address to the next.
Any help is much appreciated, thanks in advance!
At the moment I am trying to write code that makes it possible to change a users Email address. Again I update both tables in SQL. This makes it possible to login with a different Email while still being the "same" user.
This does not work for permissions though. It seems like the user loses all permissions from lists with unique permissions. I can however go to the list in sharepoint and add the new email address manually. If I do this I also need to delete the old mail reference.
How can I change a users Email address and at the same time retain it's permissions? Is this possible? Or do I need to find a way to "copy" over all the existing permissions from one mail address to the next.
Any help is much appreciated, thanks in advance!