Skip to content

Commit

Permalink
#1568 Connect modules: create profiles from 'edit' form fields, inste…
Browse files Browse the repository at this point in the history
…ad of 'add' form fields
  • Loading branch information
AlexTr committed Sep 12, 2018
1 parent 7bc3e8c commit 0e6a5b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/base/connect/classes/BxBaseModConnectModule.php
Expand Up @@ -132,15 +132,15 @@ function _createProfileRaw($aProfileInfo, $sAlternativeName = '', $isAutoFriends

// check fields existence in Account
$oFormHelperAccount = BxDolService::call('system', 'forms_helper');
$oFormAccount = $oFormHelperAccount->getObjectFormEdit();
$oFormAccount = $oFormHelperAccount->getObjectFormAdd();
foreach ($aFieldsAccount as $sKey => $mValue) {
if (!$oFormAccount->isFieldExist($sKey))
unset($aFieldsAccount[$sKey]);
}

// check fields existence in Profile
if ('system' != $this->_oConfig->sProfilesModule && $oFormHelperProfile = BxDolService::call($this->_oConfig->sProfilesModule, 'forms_helper')) {
$oFormProfile = $oFormHelperProfile->getObjectFormAdd();
$oFormProfile = $oFormHelperProfile->getObjectFormEdit();
foreach ($aFieldsProfile as $sKey => $mValue) {
if (!$oFormProfile->isFieldExist($sKey))
unset($aFieldsProfile[$sKey]);
Expand Down

0 comments on commit 0e6a5b2

Please sign in to comment.