Page 1 of 1
Clicking on the Admin Area button logs me out!
Posted: 2020-01-23 09:52
by dannybridi
Hello,
I had not accessed the site in a while, but yesterday I logged in (as admin) and then clicked on the "Admin Area" button (to do some user/group management), but instead of taking me to the admin area, I was logged out! I tried re-generating the code, but that didn't help. I was using version 5.76, but I upgraded to 5.81, but that didn't help either.
Any ideas?
Re: Clicking on the Admin Area button logs me out!
Posted: 2020-01-24 08:26
by onoehring
Hi,
did you disable cookies? Did you clear your cache first? Did you try another browser?
Olaf
Re: Clicking on the Admin Area button logs me out!
Posted: 2020-01-24 08:43
by dannybridi
Hi,
Thanks for your reply. Yes, I have tried all of the above. I also tried different machines and OS's (Windows, MacOS, iPad). They all show the same behavior.
Thanks
Re: Clicking on the Admin Area button logs me out!
Posted: 2020-01-24 09:08
by onoehring
Hi,
if I remember correctly a few days (3-4 weeks?) ago someone asked a similar question where Jan (pbötcher?) was able to give the correct hint. If I remember correctly something changed in password handling since version .??..
You may try:
a) Please check your database (phpmyadmin or similar) and see, if the users are NOT banned.
b) Maybe create a new entry in the users table yourself and make sure, that user is in the admin group. You can simply generate a password and hash it with MD5 (
http://onlinemd5.com ). Insert the MD5 into the password column of that new user. Now you should be able to login and correct the other users passwords/login data.
Olaf
Re: Clicking on the Admin Area button logs me out!
Posted: 2020-01-24 15:16
by dannybridi
Thanks Olaf.
a) I checked and the users are not banned.
b) If I create a user and set the password as you suggest, where do I tell the application to use that user instead (which AppGini file)?
Thanks
Re: Clicking on the Admin Area button logs me out!
Posted: 2020-01-24 15:20
by jsetzer
Instead of creating new users, you can try to use the password reset function. If I remember right, someone else here in the forum had similar problems and solved it that way.
Re: Clicking on the Admin Area button logs me out!
Posted: 2020-01-24 15:33
by dannybridi
You mean at the sign in page, select "Forgot your password"?
Re: Clicking on the Admin Area button logs me out!
Posted: 2020-01-24 17:04
by jsetzer
Yes, or in members management in Admin area. I don't remember how he finally solved it.
Re: Clicking on the Admin Area button logs me out!
Posted: 2020-01-24 18:40
by dannybridi
It looks like "Forgot your password" does not work for the admin account, and I cannot go into the admin area (the reason for this post) to change the password there (catch 22 situation)...
As suggested above, what if I change the password (MD5 hash) of the admin account in the membership_users table directly? I just want to be sure this is what I need to do...

Re: Clicking on the Admin Area button logs me out!
Posted: 2020-01-24 21:51
by dannybridi
I thought if I copied the hash of the admin account from the table into the config.php, it would help, but it made no difference. I still could login to the application, but as soon as I click on the admin area button I get logged out.
When are the credentials in the config.php file used?
Re: Clicking on the Admin Area button logs me out!
Posted: 2020-01-25 10:22
by pbottcher
Hi,
did you reload all files after the upgrade to 5.81? Can you trace the $_SESSION['memberID'] for the user that clicks on the ADMIN AREA button and verify that this user matches the admin user in the config.php.
Re: Clicking on the Admin Area button logs me out!
Posted: 2020-01-25 18:13
by dannybridi
Yes, I did reload all the files after the upgrade.
I unfortunately do not know how to trace the $_SESSION[‘memberID’]. How do I do it?
Thanks
Re: Clicking on the Admin Area button logs me out!
Posted: 2020-01-26 18:04
by onoehring
Hi dannybridi,
just write
Code: Select all
echo $_SESSION[‘memberID’];
die();
into your code where you want to see it's value. Should probably work.
Olaf
Re: Clicking on the Admin Area button logs me out!
Posted: 2020-01-27 09:27
by dannybridi
Thanks Olaf, but where do I put this code?
Re: Clicking on the Admin Area button logs me out!
Posted: 2020-01-27 09:32
by dannybridi
I checked the hash in the config.php file for the admin account. It was different (and much smaller in length) than the one in the membership_users table. So I copied that hash to the table. I was able to login (as before), but when I looked at the table again, the hash in the table changed back to the same hash that was in there before (it does not look like MD5). I'm confused. In any case, I still cannot access the admin area

Re: Clicking on the Admin Area button logs me out!
Posted: 2020-01-27 11:46
by dannybridi
I manually changed the password for the admin account (in the membership_users table), and was able to login, but still the admin area button logs me out!
Re: Clicking on the Admin Area button logs me out!
Posted: 2020-01-27 12:14
by dannybridi
... forgot to mention that I also changed the hash in the config.php file accordingly.
Re: Clicking on the Admin Area button logs me out!
Posted: 2020-01-27 12:30
by dannybridi
I also tried to give another user admin rights by changing the groupID field in the membership_users table from 3 to 2, but all that changed was that now that user got access to all the tables, but not the Admin Area button. Anyone know how to manually make a user full admin?
Re: Clicking on the Admin Area button logs me out!
Posted: 2020-01-27 12:52
by jsetzer
Did you already send a support request to BigProf? I think you should do. To me it seems there are more developers than just you having that problem. So this may be of common interest for others, who need to upgrade to 5.8x.
Jan
Re: Clicking on the Admin Area button logs me out!
Posted: 2020-01-27 12:58
by dannybridi
No I didn't, but I will now.
Thanks
Re: Clicking on the Admin Area button logs me out!
Posted: 2020-01-27 13:08
by onoehring
Hi,
make a user (super)admin:
Check table membership_groups and see which groupID the ADMIN group has (probably 2).
Open table membership_users and edit the user you want to make admin: Set his/her groupID to that of the ADMIN group.
Done.
And to be sure, also set isBanned to 0 and isApproved to 1.
Olaf
Re: Clicking on the Admin Area button logs me out!
Posted: 2020-01-28 09:13
by dannybridi
Olaf,
I have already tried that approach (as mentioned above), but although the user becomes admin (by changing the groupID), he does not get the "Admin Area" button! He gets to see all the tables, but not that button. It seems like only the "admin" user gets it.
Thanks
Re: Clicking on the Admin Area button logs me out!
Posted: 2020-01-28 10:17
by onoehring
Hi,
isn't this normal ... only the big superadmin gets that button... (not sure, maybe someone else can tell)?
Olaf
Re: Clicking on the Admin Area button logs me out!
Posted: 2020-01-29 16:02
by dannybridi
The issue seems to be resolved now, but I don't really know why or what caused it.
I emptied the folder of the application on the server and uploaded a fresh regenerated copy. I can now access the Admin Area again. I tried this approach before, but the difference was that I did not first delete the target location, I overwrote the files. Nevertheless, the issue is confusing. I'm glad it now works though.
Thank you all for your help.