miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Specific miniBB Support Forums / Specific /   

User System / Safe page

Author freshGuy
Registered
#1 | Posted: 30 Aug 2011 00:51 
Hello, i was woundering if there is a possible (easy) way on making f.ex. a memberscript that uses the cookie/session data you get when you log on var/www/main folder/sub-folder-forum. I need to be able to use this data on my main folder. On my website i have a very secure userscript, that saves data on session/cookie. I use php-login script v2.3 (www php-login-script com), i use the same files as the loginscript (if i didnt describe it good enough, and you want a look on the script).

I used this script back then, and i found it on my computer so i startet coding with it, and adding my own scripts that works out the data out of the logindata from the php-login-script. Anyway, i now want to make the forumdata the correct data, and i know that i now need to change the authscript fields to minibbs userdata, but i want to save the login when logged on main-page or forum the same cookie is used on both.

Author freshGuy
Registered
#2 | Posted: 30 Aug 2011 02:35 
Iv been playing around, and found your integrating way.

How do i make this work out, my usersystem saves in cookie like this;
[CODE] // this sets variables in the session
$_SESSION['user_id']= $id;
$_SESSION['user_name'] = $full_name;
$_SESSION['user_level'] = $user_level;
$_SESSION['HTTP_USER_AGENT'] = md5($_SERVER['HTTP_USER_AGENT']);

//update the timestamp and key for cookie
$stamp = time();
$ckey = GenKey();
mysql_query("update users set `ctime`='$stamp', `ckey` = '$ckey' where id='$id'") or die(mysql_error());

//set a cookie

if(isset($_POST['remember'])){
setcookie("user_id", $_SESSION['user_id'], time()+60*60*24*COOKIE_TIME_OUT, "/");
setcookie("user_key", sha1($ckey), time()+60*60*24*COOKIE_TIME_OUT, "/");
setcookie("user_name",$_SESSION['user_name'], time()+60*60*24*COOKIE_TIME_OUT, "/");[/CODE]

Author Paul
Lead Developer
#3 | Posted: 30 Aug 2011 11:37 
You may check miniBB membership synchronization guide. You don't have to program a specific script for that. Just modify miniBB functions to "align" them to your own authorization schema, and adjust the database.

Specific miniBB Support Forums / Specific / User System / Safe page Top

Your Reply Click this icon to move up to the quoted message

 Short link for this topic:

 ?
Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
 
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Check out the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB