MicrosoftEdge / enterprise-mode-site-list-portal

Other
52 stars 24 forks source link

Update UserController.cs #19

Open MarkSPowell opened 4 years ago

MarkSPowell commented 4 years ago

Chaning CreateNewUser to use the samAccountName instead of the email address for the LoginId of a new user. This matches what the LoginController uses to look up a user. Previously, this would only work if a users samAccountName matched their email address- this is not allowed in highly regulated enviroments, as it discloses users samAccountName.

MarkSPowell commented 4 years ago

This commit fixes #14

IonicEcko commented 3 years ago

Tried your edit, if an admin creates an account trough /#/User the admin's username(who created the account) is inserted into the DB column LoginID. Did the below instread, it does the thing.

List userlist = GetUserFromDifferentDomain(user.User.UserName); var logonId = userlist[0].UserName; //var logonId = User.Identity.Name; //var Index = logonId.Split('\'); //logonId = Index[1];

Am having the same issue, how did you resolve? Just those 2 lines error.