Current time: 04-25-2014, 01:26 AM Hello There, Guest! (LoginRegister)


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to modify loginconvert.php to use it with joomla password
06-18-2011, 11:08 AM (This post was last modified: 06-18-2011 11:09 AM by Majere.)
Post: #1
Not Solved How to modify loginconvert.php to use it with joomla password
Hi everybody,
I'm working on a kunena 1.6 to Mybb 1.6.3 merge system, but i'm not such a good coder.
I hope someone here can help me extending loginconvert.php plugin in order to use it also with joomla passwords.
This is a little piece of code illustrating how joomla passwords (kunena uses joomla passwords) are generated:

PHP Code:
//--your unencrypted password goes here-->
$password 'mypassword';
//generate salt----------------------------------->
   
for ($i=0$i<=32$i++) {
      
$d=rand(1,30)%2;
      
$salt .= $d chr(rand(65,90)) : chr(rand(48,57));
   } 
//end generate salt--------------------------------|

//hash password with salt-->
$hashed md5($password $salt);

//here is your new encrypted password, ready to store in the database table,  `jos_users`
$encrypted $hashed ':' $salt;

//So now if you "UPDATE `#__users` SET `password`='$encrypted' WHERE `email`='$email';"
//You can change your password.. 

Any suggestions? Thanks a lot in advanceShy
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication