Skip to content

Commit

Permalink
Added WA ID to EmployeeID field. Beginning of stuff for #9
Browse files Browse the repository at this point in the history
  • Loading branch information
tachoknight committed Jun 13, 2020
1 parent cf04ed7 commit 68ec01b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ADActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,10 @@ private void CreateUser(Member member)
userPrincipal.PasswordNotRequired = false;

userPrincipal.Enabled = true;
userPrincipal.ExpirePasswordNow();
userPrincipal.ExpirePasswordNow();

// Set the "Employee ID" to the WA member ID
userPrincipal.EmployeeId = member.Id.ToString();

try
{
Expand Down Expand Up @@ -247,6 +249,9 @@ private void UpdateUser(Member member, ref UserPrincipal userPrincipal)
}
}

// Set the "Employee ID" to the WA member ID
userPrincipal.EmployeeId = member.Id.ToString();

// And update their group memberships
addUserToGroups("Computer Authorizations", ref userPrincipal, member);
// And do the same thing for the other authorizations (e.g. welders, lathe, etc.)
Expand Down

0 comments on commit 68ec01b

Please sign in to comment.