fix my account too please :)
Hey mmarkin wondering if u could fix my account too please...email me at [email protected] and i will email u the necessary information thanks alot in advance,
Louie
I wonder if small PHP script could help?
Seeing that the people still have problems with logging to the site, I wonder if a small php script couldn't be of help. Now I will start theoretising ;) bcoz I don't have access to vbuletin nor I know how does it work... So I assume that this is typical php bulletin board w/MySQL support (?). If so, then probably user profile is stored in a table somewhere out there :). Now, the script could go the following algorithm:
[list=1][*]Authorization - fetch the user password, verify it against the one stored in database. The trick is NOT TO USE vbuletin authorization, rather use own-written procedure - to make sure the script would work and not "loop back to login page".[*]make necessary adjustments in the user profile (i.e. turn autologin on)[*]inform the user that the change has taken place and clear his flashkit cookies.[*]the user then could try to login on his own.[/list=1]
The script could look a bit like this (in pseudo php ;)... I assume buffering is on and flushed automatically... Oh, and I assume it's PHP4.01 or sth like that, without those _POSTDATA tables (or sth. like that, i'm still on 4.01)
PHP Code:
<?php
switch($op) {
case ChangeProfile:
setcookie("flashkitcookiename","",time()-3600,"/"); //unsure 'bout this
$lg=addslashes($lg);//mysql_real_escape_string() in newer php. I usually use custom regexp 4 this...
$qr="SELECT userid,pwd FROM userdata WHERE login='$lg'";
$rs=mysql_query($qr);
list($uid,$upwd)=mysql_fetch_row($rs);
//decrypt upwd if necessary, or encrypt pw - either way round ;D
if ($upwd==$pw) doFancyUserProfileChange($uid);
else echo "authorization error.";
mysql_free_result($rs);
break;
default:
?>
<form method=post>
Login: <input name=lg>
Passwd: <input type=password name=pw>
<input type=submit name=op value="ChangeProfile">
</form>
<?php
break;
}; //endswitch
function doFancyUserProfileChange($userid) {
$qr="UPDATE UserProfileTable SET autologin='yes' where userid='$uid'";
mysql_query($qr);
echo "User profile changed succesfully, try to login...";
}; //endfunction doFancyUserProfileChange()
?>
Now there is a lot of guessing here, but I hope you get the idea...
Hope it helps somebody...
may the luck be with You ;)
StarLight