mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 14:18:27 +01:00
Fix #3315: Exception on first login with ldap
This commit is contained in:
parent
fd9ff98955
commit
b1414e3ebb
@ -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)
|
||||
|
@ -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
|
||||
@ -173,11 +173,11 @@ class Registration extends HForm
|
||||
$groupFieldType = "hidden";
|
||||
$defaultUserGroup = $groupModels[0]->id;
|
||||
}
|
||||
|
||||
if(!$defaultUserGroup && empty($groupModels)) {
|
||||
|
||||
if (!$defaultUserGroup && empty($groupModels)) {
|
||||
$groupFieldType = "hidden";
|
||||
}
|
||||
|
||||
|
||||
return [
|
||||
'type' => 'form',
|
||||
'elements' => [
|
||||
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user