R0.30 Support

Non-activated users clarification

  • Brian Cunningham
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
15 years 5 months ago #1 by Brian Cunningham
Non-activated users clarification was created by Brian Cunningham
Sorry I couldn't respond in the original thread, it's locked.

Just to be clear,

This
Code:
unction login ($username, $password) { if (!plgXMLRPCJoomdleServices::check_origin ()) return new xmlrpcresp(0, 1, JText::_("Access Denied")); $mainframe =& JFactory::getApplication('site'); $options = array ( 'skip_joomdlehooks' => '1'); $credentials = array ( 'username' => $username, 'password' => $password); if ($mainframe->login( $credentials, $options )) return true; return false; }

Completely replaces this?
Code:
function login ($username, $password) { if (!plgXMLRPCJoomdleServices::check_origin ()) return new xmlrpcresp(0, 1, JText::_("Access Denied")); $db =& JFactory::getDBO(); $query = 'SELECT `id`, `password`, `gid`' . ' FROM `#__users`' . ' WHERE username=' . $db->Quote( $username ) ; $db->setQuery( $query ); $result = $db->loadObject(); if($result) { $parts = explode( ':', $result->password ); $crypt = $parts[0]; $salt = @$parts[1]; $testcrypt = JUserHelper::getCryptedPassword($password, $salt); if ($crypt == $testcrypt) { return true; } else { return false; } } else { return false; } return false; }

Can I suggest it might be easier to post the entire zipped replacement file for this type of thing. B)

Please Log in or Create an account to join the conversation.

More
15 years 5 months ago #2 by Antonio Durán
Replied by Antonio Durán on topic Re: Non-activated users clarification
Yes, that is it, replace and you are set to go.

I did not post the new file, as I have not verified it does not contain more R0.4 code that might not be compatible with R0.3 code.

We hope to have R0.4 released really soon.

Please Log in or Create an account to join the conversation.