Didn't know where to exactly post this. Move it please if it's in the wrong forum.
I've added a piece of code to the Your_Account module.
A simply checkbox 'user_remember' to let the users set this if they want to be logged in after they close their browser, or logged off when do close it.
Where can I find the rest of this code. I wish to apply this remember_me function. I searched lik crazy but I cant find it.
zhenghe Nuke Cadet
Joined: Oct 11, 2005
Posts: 6
Posted:
Tue Nov 08, 2005 12:21 am
Well, sorry for bumping this, but i've been trying to find something like this for a while, to no avail...
i tried to build this myself, with the new function. Well, I add the checkbox and change the docookie function, but what else? I don't know how to pass the value of the checkbox to a global var to be used in do cookie
Any help?
zhenghe Nuke Cadet
Joined: Oct 11, 2005
Posts: 6
Posted:
Tue Nov 08, 2005 9:55 am
BTW, does it have to be with register_globals from my host? I mean, I cannot find, for example, where the login function in your_account gets its parameters passed... it may be i'm not killing edge with php but i cannot find it anyway.
any hint? i think i can work it all out by myself if i get to pass that variable, or better, if i get to make it global somehow...
thanks
Evaders99 Site Admin
Joined: Aug 17, 2003
Posts: 12482
Posted:
Tue Nov 08, 2005 2:26 pm
The variables are registered in phpNuke whether or not register_globals is enabled.
If register_globals is enabled, then it is fine.
If not, phpNuke uses import_request_variables to do the same thing
function docookie($setuid, $setusername, $setpass, $setstorynum, $setumode, $setuorder, $setthold, $setnoscore, $setublockon, $settheme, $setcommentmax) {
global $user_remember;
if ( ($setusername == '') || !preg_match('/^[a-zA-Z0-9_-]+$/', $setusername) ) die('Mensaje de la sala: nombre de usuario ilegal');
if ( ($setpass == '') || !preg_match('/^[a-fA-F0-9]{32}$/', $setpass) ) die('Mensaje de la sala: password ilegal');
and that's it? or do i have something to do in the login function?
thx
-edit-
well, i did it that way and didn't work... i tried it echoing the $user_remember var in user_info, that gets called after a successful login, and it was always 0, as in init.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum