Failed to create portal user

Hi friends,

I’ve installed SuiteCRM and Joomla on a local development environment with AOP active. After clicking the Create Portal User action, I get the error message “Failed to create portal user”.

Current state of affairs:

  • SuiteCRM and Joomla environments can ping each other
  • is the SuiteCRM URL
  • is the Joomla URL
  • Joomla home page is set to public
  • Joomla user on SuiteCRM has admin rights
  • php-curl is installed
  • /var/www directory is owned by www-data with 775 permissions, all recursive, both environments
  • Contact has valid email address
  • No PHP errors outside of harmless notices and warnings on either environment
  • Apache access.log on SuiteCRM shows: - - [25/Sep/2017:05:59:23 +0000] “POST /service/v4_1/rest.php HTTP/1.1” 200 311 “-” “-”
  • suitecrm.log shows: [FATAL] SECURITY: User authentication for joomla failed [FATAL] FAILED LOGIN:attempts[1] - joomla
  • I’m able to log into SuiteCRM manually using the Joomla user with the same credentials that are on the AOP settings page in Joomla
  • Since the “Add File” button on these forums is broken, links to screenshots of AOP settings pages are as follows:

In desperate need of a solution here. Thank you in advance for the help.

I don’t know the answer, but here are some clues to get you started:

That message comes from here.

Which means the function returning false is this one.

Maybe you can try debugging it there, printing out some variable values, etc.

1 Like

Thank you for posting this, it pointed me in the right direction and I was able to find the bug.

After logging the password that was passed to the authentication function, I realized it was the wrong MD5 hash. On the AOP settings page on Joomla, I changed the password, yet the hash in the Joomla database stayed the same. Updating the password only is broken. To update the password, I had to also update the username at the same time. This caused the hash to update on the database. After that, a portal user was successfully created and all is now working.

Where can I post this bug? I’d like to save others the frustration I faced.

Thanks again for the help.

I’m glad you sorted things out!

The place to report is here

You can also propose a Pull Request for a fix if you find the time. But I am not sure if the Portal code is in that repo, so if you don’t find it, it’s likely a separate project… and in that case I don’t think it’s on GitHub.

Thank you, turns out it is on GitHub, so I posted the issue there.

1 Like