Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 03:49 pm EST
Geeklog Forums
Geeklog booting me off my own site
Nic
Anonymous
I am having login issues with my geeklog site (www.studentwire.net). I am repeatedly being logged in and booted out of the admin section while my profile remains logged in but without providing me with admin access.
Does anyone have any clue??
Does anyone have any clue??
15
12
Quote
Status: offline
mevans
Forum User
Full Member
Registered: 02/08/04
Posts: 393
Location:Texas
Nic,
This is caused by a small bug in the lib-custom.php that shows up when you turn on custom registration (like if you implement CAPTCHA).
The fix is simple edit the lib-custom.php file (located in system/).
Not sure of the exact line number but search for:
/* Function called when saving the user profile. */
/* This function can now update any extra fields */
function custom_usersave($uid)
{
global $_CONF, $_TABLES;
DB_query("UPDATE {$_TABLES['users']} SET cookietimeout='{$_POST["cooktime"]}'");
}
and make it look like this:
function CUSTOM_userSave($uid)
{
global $_CONF, $_TABLES;
$cooktime = 0;
if (isset ($_POST['cooktime'])) {
$cooktime = COM_applyFilter ($_POST['cooktime'], true);
if ($cooktime < 0) {
$cooktime = 0;
}
DB_query("UPDATE {$_TABLES['users']} SET cookietimeout = $cooktime WHERE uid = $uid");
}
}
Basically replace the CUSTOM_userSave() function with the new code above and that should take care of it. You might want to go into your profile and make sure you have the "Remember Me For" setting to something other than don't.
Let me know if this takes care of the issue.
Thanks!
Mark
This is caused by a small bug in the lib-custom.php that shows up when you turn on custom registration (like if you implement CAPTCHA).
The fix is simple edit the lib-custom.php file (located in system/).
Not sure of the exact line number but search for:
Text Formatted Code
/* Function called when saving the user profile. */
/* This function can now update any extra fields */
function custom_usersave($uid)
{
global $_CONF, $_TABLES;
DB_query("UPDATE {$_TABLES['users']} SET cookietimeout='{$_POST["cooktime"]}'");
}
and make it look like this:
Text Formatted Code
function CUSTOM_userSave($uid)
{
global $_CONF, $_TABLES;
$cooktime = 0;
if (isset ($_POST['cooktime'])) {
$cooktime = COM_applyFilter ($_POST['cooktime'], true);
if ($cooktime < 0) {
$cooktime = 0;
}
DB_query("UPDATE {$_TABLES['users']} SET cookietimeout = $cooktime WHERE uid = $uid");
}
}
Basically replace the CUSTOM_userSave() function with the new code above and that should take care of it. You might want to go into your profile and make sure you have the "Remember Me For" setting to something other than don't.
Let me know if this takes care of the issue.
Thanks!
Mark
10
13
Quote
Nic
Anonymous
Thank you so much for the help. I have just implimented the Captcha system, last night!!
Much appreciated!
Much appreciated!
10
11
Quote
Status: offline
PWR
Forum User
Junior
Registered: 04/02/06
Posts: 21
This worked for me... for a while... until the very next valid user registration. At that point I began getting bumped from my site again, even after making the changes suggested above.
After the user reg, I noticed the User Functions / Account Info / Remember Me setting had once again been reset to "don't", but this time, after resetting it to "1 month" yet again I continue to be bounced out.
This is very disturbing and distracting.
More help, please
After the user reg, I noticed the User Functions / Account Info / Remember Me setting had once again been reset to "don't", but this time, after resetting it to "1 month" yet again I continue to be bounced out.
This is very disturbing and distracting.
More help, please
8
10
Quote
Status: offline
PWR
Forum User
Junior
Registered: 04/02/06
Posts: 21
mevans, I'm running 1.4.0sr2, and CAPTCHA is the only custom registration item.
My logs indicate CAPTCHA is doing a wonderful job, refusing hundreds of attempts daily. I do suspect it's involved in this situation somehow though, because this problem never occurred until the day of CAPTCHA installation.
My logs indicate CAPTCHA is doing a wonderful job, refusing hundreds of attempts daily. I do suspect it's involved in this situation somehow though, because this problem never occurred until the day of CAPTCHA installation.
11
10
Quote
Status: offline
PWR
Forum User
Junior
Registered: 04/02/06
Posts: 21
mevans,
Ah, I was a bit mistaken above. My revision to lib-custom.php wasn't exactly what you offered above, but what was offered to me a week or so ago in a similar thread.
I'm re-revising to the above code now, will report back if the problems continue.
Thanks,
PWR
Ah, I was a bit mistaken above. My revision to lib-custom.php wasn't exactly what you offered above, but what was offered to me a week or so ago in a similar thread.
I'm re-revising to the above code now, will report back if the problems continue.
Thanks,
PWR
12
12
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
All times are EST. The time is now 03:49 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content