Skip to content

Commit

Permalink
Couldn't create a new user
Browse files Browse the repository at this point in the history
Each time create a random password it will be different than the previous time. Obviously this is NOT what you want when you are, um, passing two supposedly _identical_ passwords to the Joomla user registration code. Oops!
  • Loading branch information
Nicholas K. Dionysopoulos committed Aug 25, 2016
1 parent 1cc71aa commit 5f0eb28
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions plugins/authentication/facebook/facebook.php
Expand Up @@ -284,11 +284,12 @@ protected function createUser($email, $name, $verified, $offset)
throw new RuntimeException(JText::_('PLG_AUTHENTICATION_FACEBOOK_ERROR_LOCAL_USERNAME_CONFLICT'));
}

$data = array(
$randomPassword = JUserHelper::genRandomPassword(32);
$data = array(
'name' => $name,
'username' => $this->deriveUsername($username),
'password1' => JUserHelper::genRandomPassword(32),
'password2' => JUserHelper::genRandomPassword(32),
'password1' => $randomPassword,
'password2' => $randomPassword,
'email1' => JStringPunycode::emailToPunycode($email),
'email2' => JStringPunycode::emailToPunycode($email),
);
Expand Down

0 comments on commit 5f0eb28

Please sign in to comment.