In the course of working with DNN, you may need to remove a user account from a specific site portal but not any others. It may be that this particular portal account has incorrect permissions and you need to rebuild the account from the beginning or you just need to revoke the user access altogether.
- Access to the SQL Server
- Access to a SuperUser account
1. With your SuperUser/Admin account, login to your EVOQ instance and use the Persona Bar to select Settings > Site Settings.
2. On the following site settings screen, select the portal you would like to delete the user from via the portal drop-down at the top of the page and take note of the Portal ID Number (in the screenshot below, the ID number is 0.)
3. Go back to your Persona Bar and select Settings > SQL Console.
4. You will need to run the following SQL query to find the User ID of the user you would like to delete:
Select * from Users where Username='ENTER_THE_USERNAME_YOU_WANT_TO_DELETE_HERE'
The output of this will be:
Take note of the UserID.
5. Now that you have the PortalID and the UserID you will need to validate that this is the correct account with the following SQL query:
select * from UserPortals where PortalId='PUT_PORTAL_ID_HERE' and UserId='PUT_USER_ID_HERE'
Validation can be found in the query output here:
6. Once you have validated, run the following SQL query to delete the user account from the specific portal:
Delete from UserPortals where PortalId='PUT_PORTAL_ID_HERE' and UserId='PUT_USERID_HERE'
The output of the query will be as follows:
7. Go to Settings > Servers from your Persona Bar. Click on Clear Cache and then Restart Application.
This however will not remove the entire user as the user information will still exist, it will just not exist for that particular portal. If you would like to permanently delete the user, you will need to delete the user account through the UI for all portals.
To validate that the account has been deleted, login to the specific portal as an Admin/SuperUser and use the Persona Bar to select Manage > Users. The user account should no longer be listed there.