Manually creating a new Admin user
Try these things first
Here's a few things you can do in the rare event that you are being locked out of your site's Admin account:
- Obviously, if you forgot your password, you can request a new one using the "forgot password" option, www.example.com/users.php?mode=getpassword
- If your email address isn't valid any more then you can edit it directly in the database (field email in the gl_users table).
- If sending the email doesn't work (due to spam filters or the mail server being down) you can reset your password to "password" by changing the passwd field in the gl_users table to 5f4dcc3b5aa765d61d8327deb882cf99. So in an SQL statement:
UPDATE gl_users SET passwd = '5f4dcc3b5aa765d61d8327deb882cf99' WHERE uid = 2;(assuming your user's id is 2, which is the case for the default Admin account).
If none of the above work or if your database is damaged and you can't use a backup then it may be time to create a new Admin user (i.e. a new user that is a member Geeklog's Root group).
Creating a new Admin user
First of all, you need an account that you can log into. If you already have such an account, you can upgrade it with the steps outlined below. Otherwise, simply sign up as a new user on your own site.
Next, you need to know the user ID (uid) of that account. You can look it up in the database or you can go to your own profile page (e.g. from the link in the Who's Online block or go to My Account and save the information, which will also take you to your profile page). Check the URL in your browser - it will read something like .../users.php?mode=profile&uid=242 where instead of "242" you will see your user's uid.
The final step is to make that user a member of the Root group. This is achieved by the following SQL request (replacing "myuid" with your user's actual uid):
INSERT INTO gl_group_assignments (ug_main_grp_id, ug_uid) VALUES (1, myuid);
When you log in as that user, you should then have full access to everything on your Geeklog site again and can proceed to fix your original Admin account, if necessary.