Skip to content

Commit

Permalink
Merge pull request #23549 from JMAConsulting/issue_39
Browse files Browse the repository at this point in the history
[Joomla 4.0] Fatal error on submitting Profile with CMS username/password
  • Loading branch information
eileenmcnaughton authored May 25, 2022
2 parents 5f87f8e + 470b492 commit 5679f4c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions CRM/Utils/System/Joomla.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,17 @@ public function __construct() {
*/
public function createUser(&$params, $mail) {
$baseDir = JPATH_SITE;
require_once $baseDir . '/components/com_users/models/registration.php';

$userParams = JComponentHelper::getParams('com_users');
$model = new UsersModelRegistration();

if (version_compare(JVERSION, '4.0.0', 'ge')) {
$model = JFactory::getApplication()->bootComponent('com_users')->getMVCFactory()->createModel('Registration', 'Site');
$model->set('data', new \stdClass());
}
else {
require_once $baseDir . '/components/com_users/models/registration.php';
$model = new UsersModelRegistration();
}

$ufID = NULL;

// get the default usertype
Expand Down

0 comments on commit 5679f4c

Please sign in to comment.