c# - SharePoint MySites URL Conflict -
SharePoint site has a user login that we created using our email address and it becomes their username Creates a problem for MySites.
When the user creates a MySset by cutting anything after the @Simbel in the user name, then the user's email address, user1@test.com, becomes the URL to your MySite:
http: // host / personal / user1 /
However this causes a problem if they have another user with the same email prefix but a separate domain That is, with user1@anotherdomain.com. This user needs to sign up for MySite URL on the site
http: // host / personal / user1 /
Using:
(Profile Manager.UserExists (Username)) {UserProfile profile = profileManager.CreateUserProfile (username); Profile ["favorite name"]. Value = Full Name! = Null? Full Name: Username; Profile ["WorkEmail"]. Value = email! = Null? E-mail : ""; Profile ["PersonalSpace"] Value = email; Profile.Commit (); #region Create user (SPS ite site = profile.personal site) using my site {if (site == null) {try {profile.Create Personal Site (); } Hold (exception before) {System.Diagnostics.Trace.WriteLine (string.Format ("CreateMySite - {0}", formerly message)); East; }}} #endrian} HttpContext.Current = httpCxt;
Can I do something to use the URL?
- Edit
The above behavior is the default for MOSS ie. I'm not taking the user's email address manually, it's something that is doing automatically automatically. If I can say that URL should be, I would prefer it:
http: // host / personal / user1-at-test-dot-com
I have tried to avoid an email address and assigned it according to the personal space value:
string = email. Change ("@", "- et-"); Profile ["PersonalSpace"] Value = clean; ....
but it has not helped.
is an unusual way to do this, is there any special reason user created based on email Not a name? Anyway, here are some ideas.
- Use common naming dispute solutions, include domains in the URL user domain,
- Create a unique id user_1, user_2 If there is a dispute and generate the next one Check the number after underscore for
Edit
Depending on your editing, you can configure yourself the conflict resolution in Moscow, so I It was said that this is a strange way of making the URL,
< P> In your SSP, go to MySite Settings, Site Naming Formats GroupView your options:
-
Username Examples:
-
User name (Resolve conflict using domain_US name) Example: ... / username / or ... / domain_username / / P>
-
Domain and user names (will not conflict with them) Example:
Comments
Post a Comment