Promoting DNN User to Super user 

As someone pointed out on the DotNetNuke message boards, my previous example of creating a new host account via SQL is a bit over-involved in certain special cases. If you have an user account that you would simply like to promote to a host account it is a very simple single SQL Script. This process can be very helpful if you are looking to take for example your personal account and promote it to a host to fix errors. However, you want to be sure that you are careful which account you promote as anyone that would log in with this account after the change will have host permissions!

The Script

To update the user account simply run the below script, be sure to put your username in for the username.

UPDATE users
SET IsSuperUser 1
WHERE username 'TestUser'

Posted by Mitchel on Saturday, February 24, 2007
 

Comments

Thanks for this.

Although I'm not sure this is quite enough to get the user to full superuser status.

When I applied this to a user account they still remained listed in the portal user list rather than in the superuser list - so they can still be deleted by portal admins...

To fix this (looking at the source for DotNetNuke.Modules.Admin.Users.UserAccounts) I think you'd need to delete the relevant userId from the PortalUsers table - but I've not tried this yet!

By H on Monday, December 10, 2007 at 6:49 AM

Yes, you are correct!

By mitchel.sellers@gmail.com on Monday, December 10, 2007 at 3:51 PM

I am honestly surprised that DNN doesn't allow you to assign this role if you are a host user. It could spell trouble for those not adapt at SQL like myself. Unles there is a way to give module upload access to an admin?

By Dragonlance on Wednesday, April 09, 2008 at 3:49 AM

Dean,

I would agree to a certain extent....but the permissions granted with host access are so great, that in my opinion it should be external to normal roles.

You can create a new Host user easily via the "Host Accounts" menu options.

By mitchel.sellers@gmail.com on Wednesday, April 09, 2008 at 3:58 AM
Click here to post a comment

Donate

Show your appreciation for the content/modules made available by MitchelSellers.com by making a donation. Donations are used to assist with dedicating time to creating free content.