Fix #3315: Exception on first login with ldap

This commit is contained in:
Lucas Bartholemy 2018-10-10 11:51:15 +02:00
parent fd9ff98955
commit b1414e3ebb
2 changed files with 12 additions and 9 deletions

View File

@ -19,6 +19,7 @@ HumHub Change Log
- Enh: Added `humhub\modules\file\models\isAssignedTo($record)` argument in order to check if a File is attached to a specific record
- Fix: rich-text mobile view wrong min-height calculation
- Fix #3314: layout container width differences
- Fix #3315: Exception on first login with ldap
1.3.4 (September 25, 2018)

View File

@ -8,14 +8,14 @@
namespace humhub\modules\user\models\forms;
use humhub\compat\HForm;
use humhub\modules\user\models\Group;
use humhub\modules\user\models\GroupUser;
use humhub\modules\user\models\Password;
use humhub\modules\user\models\Profile;
use humhub\modules\user\models\User;
use Yii;
use yii\helpers\ArrayHelper;
use humhub\compat\HForm;
use humhub\modules\user\models\User;
use humhub\modules\user\models\Group;
use humhub\modules\user\models\Profile;
use humhub\modules\user\models\Password;
use humhub\modules\user\models\GroupUser;
/**
* Description of Registration
@ -255,6 +255,8 @@ class Registration extends HForm
$this->models['Profile']->user_id = $this->models['User']->id;
$this->models['Profile']->save();
$this->models['User']->populateRelation('profile', $this->models['Profile']);
if ($this->models['GroupUser']->validate()) {
$this->models['GroupUser']->user_id = $this->models['User']->id;
$this->models['GroupUser']->save();