Recently I have answered a number of questions regarding what to do when you accidentally change the login tab setting in "Portal Settings" on a DotNetNuke website to a tab that does not have a login module. This situation which is very easy to get yourself into is also one that is VERY easy to get out of as long as you are able to directly connect to SQL Server. If you are unable to connect directly to the SQL Server to run queries it will be a bit more involved to resolve the issue. In this posting, I will discuss the very simple SQL Script needed to reset the LoginTabId value and get you back into your site.
Getting Ready
As I mentioned this process is very simple and you ONLY need 1 piece of information to be able to successfully execute the script that I will provide below. This piece of information is the "PortalId" of the portal you wish to modify. If you are unsure of your portal id you can easily locate it by running the following script to get a listing of portals.
Once you have your portal id we are ready to fix your site!
Performing the Fix
To fix your site we will simply clear the value for the Login Tab selection, this will remove any setting for a login page and the login link will function as a standard DNN installation will by injecting the login module for you. After you are back into your site you can re-configure the login tab selection to the proper tab. To perform this database change simply run the below script, be sure to modify the portalId value to be your proper portal id.
Now that we have updated the login tab value we will need to trigger an Application Restart due to the caching that is completed by DotNetNuke. The easiest method of doing this is to add a space to a NON-critical portion of your web.config file and saving the change.
Once you have saved your web.config file you should now be able to browse to your site and login as normal! Please let me know if you have any questions or feedback regarding this tutorial.