Ok, one down ... I have my passwords now and can change to CLEAR, then update them all again.
Next up
I want to synch users' roles with my external application. I run queries to edit the UserRoles table and the ASPNET_UsersInRoles. It looks though like I need to enter the data somewhere more.
Here's what I do:
--INSERT USERS WHO HAVE BEEN ADDED TO THE TECHNICIAN ROLE
DECLARE @roleID nvarchar(50)
SELECT @ROLEID = (SELECT TOP 1 ROLEID FROM aspnet_roles INNER JOIN aspnet_Applications apps ON aspnet_roles.applicationID = apps.applicationID WHERE Rolename LIKE '%Service Training Mentor%' and apps.applicationname = 0)
--INSERT INTO aspnet_usersinroles (USERID, roleid)
SELECT distinct aspusers.userid, @ROLEID
FROM
[salesforce backup].dbo.contact contact inner join users on contact.userid__c = users.userid
left join aspnet_users aspusers on users.username = aspusers.username
--left join aspnet_usersinroles aspuir on aspuir.userid = aspusers.userid
--left join aspnet_roles aroles on aroles.roleid = aspuir.roleid
--inner join aspnet_applications apps ON aroles.applicationid = apps.applicationID
where functional_Role__C LIKE '%Service Training Mentor%'
and aspusers.userid NOT IN
(SELECT UserID FROM aspnet_usersinroles aspuir INNER JOIN aspnet_roles aroles
on aspuir.roleid = aroles.roleid WHERE aroles.rolename like '%Service Training Mentor%')
The value is inserted, but I still don't see the newly added role when I go to either the user record or the Security Roles admin screen.
Does anyone know - what else does the
AspNetRoles.AddUserToRole(objUser.Membership.Username, objUserRole.RoleName)
do, other than add a record to aspnet_usersinroles ?
Thanks!
Rozanne