diff --git a/app/Models/Mship/Account.php b/app/Models/Mship/Account.php index a3fd2b1802..dbd41514ad 100644 --- a/app/Models/Mship/Account.php +++ b/app/Models/Mship/Account.php @@ -231,7 +231,7 @@ protected static function boot() public static function eventCreated($model, $extra = null, $data = null) { // Add to default role - $defaultRole = Role::where('default', 1)->limit(1)->get(); + $defaultRole = Role::where('default', 1)->limit(1)->first(); $model->assignRole($defaultRole); } diff --git a/app/Models/Mship/Concerns/HasRoles.php b/app/Models/Mship/Concerns/HasRoles.php index ef0fef835f..b71b853b06 100644 --- a/app/Models/Mship/Concerns/HasRoles.php +++ b/app/Models/Mship/Concerns/HasRoles.php @@ -40,8 +40,7 @@ public function fireRoleAssignedEvent($role) return array_walk($role, [$this, 'fireRoleAssignedEvent']); } - // Causing issues... - // event(new RoleAssigned($this, $this->getStoredRole($role))); + event(new RoleAssigned($this, $this->getStoredRole($role))); return true; }