MyBB Community Forums

Full Version: crypting, style
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

1.) I want to create login on site, so when I login on my web site I want to be logged on forums. Are you using md5() ?

http://pajhome.org.uk/crypt/md5/ When i crypt there (md5) my username is different from password in phpmyadmin which I see (crypted) What function are you using for crypting?

2.)Also is there any folder "style" or something else to change style or what..

Thanks,
Kyle.
Kyle.. Wrote:Hello,

1.) I want to create login on site, so when I login on my web site I want to be logged on forums. Are you using md5() ?

http://pajhome.org.uk/crypt/md5/ When i crypt there (md5) my username is different from password in phpmyadmin which I see (crypted) What function are you using for crypting?
You can use the salt_password function:
$password = $_GET['password']; // from form
$salt = // you have to get the salt from the user's information in mybb_users

$salt_password = salt_password(md5($password), $salt);

Or simply you can
validate_password_from_username($_GET['username'], $_GET['password']);

Quote:2.)Also is there any folder "style" or something else to change style or what..

Thanks,
Kyle.

There're theme and template editors in the Admin CP to change the style
Thanks for answer.

<?php

session_start();

include("config.php");

$username = addslashes($_POST['username']);
$password = addslashes($_POST['password']);



$select = mysql_query("SELECT * FROM forum_users WHERE username='$username'");
while($a=mysql_fetch_array($select)){



$salt_password = (md5($password) AND $a["salt"]); 
echo $salt_password;


	if($username===$a["username"] AND $salt_password===$a["password"]){
		
		$session_id = session_id();
		$_SESSION["user_id"] = $a["id"];
		setcookie("checksid",$sessionid,time()+60*60*24*30*60);

		header("Location: pocetna/");
		
		
	}
	
}

	include ("pogresan_login.html"); 


?>

I wrote
echo $salt_password;
to see what i get, i get only number "1" , when I write:

$salt_password = salt_password(md5($password), $a["salt"]); 

I get that function does not exist something like that..

Sad hmm ? how do you get salt ... Confused
change:
$salt_password = (md5($password) AND $a["salt"]); 
to:
$salt_password = md5(md5($a["salt"]) . md5($password)); 
I got it now by:
include("forum/inc/functions_user.php");
$salt_password = salt_password(md5($password), $a["salt"]); 

also
$salt_password = md5(md5($a["salt"]) . md5($password)); 

is working, and I successfully log in, but when i go on forum page i am not logged there, why?

Thanks. Smile

Edit: I can get number of posts, etc, but .. im not logged on forums.
Update. Smile * On top *
There is no help for me? SadSad