From fd774e5e80610984661003fb854a3f8794420dea Mon Sep 17 00:00:00 2001 From: REJack Date: Mon, 11 Feb 2019 13:31:41 +0100 Subject: [PATCH] fixed DBGroup setup in GroupModel, PermModel & UserModel --- app/Models/Aauth/GroupModel.php | 9 +++++---- app/Models/Aauth/PermModel.php | 9 +++++---- app/Models/Aauth/UserModel.php | 9 +++++---- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/app/Models/Aauth/GroupModel.php b/app/Models/Aauth/GroupModel.php index 8c4edbb..343056e 100644 --- a/app/Models/Aauth/GroupModel.php +++ b/app/Models/Aauth/GroupModel.php @@ -53,16 +53,17 @@ class GroupModel extends Model */ public function __construct($db = null, $validation = null, $config = null) { - parent::__construct(); - if (is_null($config)) { $config = new AauthConfig(); } - $this->config = $config; + $this->config = $config; + $this->DBGroup = $this->config->dbProfile; + + parent::__construct(); + $this->table = $this->config->dbTableGroups; - $this->DBGroup = $this->config->dbProfile; $this->tempUseSoftDeletes = $this->config->dbSoftDeleteGroups; $this->tempReturnType = $this->config->dbReturnType; diff --git a/app/Models/Aauth/PermModel.php b/app/Models/Aauth/PermModel.php index ef42ae5..e1d17f0 100644 --- a/app/Models/Aauth/PermModel.php +++ b/app/Models/Aauth/PermModel.php @@ -53,16 +53,17 @@ class PermModel extends Model */ public function __construct($db = null, $validation = null, $config = null) { - parent::__construct(); - if (is_null($config)) { $config = new AauthConfig(); } - $this->config = $config; + $this->config = $config; + $this->DBGroup = $this->config->dbProfile; + + parent::__construct(); + $this->table = $this->config->dbTablePerms; - $this->DBGroup = $this->config->dbProfile; $this->tempUseSoftDeletes = $this->config->dbSoftDeletePerms; $this->tempReturnType = $this->config->dbReturnType; diff --git a/app/Models/Aauth/UserModel.php b/app/Models/Aauth/UserModel.php index e656f17..10db6be 100644 --- a/app/Models/Aauth/UserModel.php +++ b/app/Models/Aauth/UserModel.php @@ -78,16 +78,17 @@ class UserModel extends Model */ public function __construct($db = null, $validation = null, $config = null) { - parent::__construct(); - if (is_null($config)) { $config = new AauthConfig(); } - $this->config = $config; + $this->config = $config; + $this->DBGroup = $this->config->dbProfile; + + parent::__construct(); + $this->table = $this->config->dbTableUsers; - $this->DBGroup = $this->config->dbProfile; $this->tempUseSoftDeletes = $this->config->dbSoftDeleteUsers; $this->tempReturnType = $this->config->dbReturnType;