Posted on: 10/18/06 08:52am
By: Anonymous (Nic)
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??
Geeklog booting me off my own site
Posted on: 10/18/06 09:35am
By: mevans
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
Geeklog booting me off my own site
Posted on: 10/18/06 10:18am
By: Anonymous (Nic)
Thank you so much for the help. I have just implimented the Captcha system, last night!!
Much appreciated!
Geeklog booting me off my own site
Posted on: 10/19/06 12:19pm
By: PWR
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
Geeklog booting me off my own site
Posted on: 10/19/06 12:24pm
By: mevans
PWR,
Tell me a little more about your environment like which version of Geeklog you are running, are there any other custom registration items besides the CAPTCHA?
Thanks!
Mark
Geeklog booting me off my own site
Posted on: 10/19/06 01:07pm
By: PWR
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.
Geeklog booting me off my own site
Posted on: 10/19/06 01:12pm
By: PWR
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
Geeklog booting me off my own site
Posted on: 10/19/06 02:41pm
By: Dirk
Maybe
this[*1] will make it clearer what has to be changed.
We'll have to sort out the issues with 1.4.1 first, but after that we will probably release a small update for 1.4.0 which will contain the above change.
bye, Dirk