diff options
-rw-r--r-- | src/Psecio/Gatekeeper/UserGroupCollection.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Psecio/Gatekeeper/UserGroupCollection.php b/src/Psecio/Gatekeeper/UserGroupCollection.php index 036aee7..6db6195 100644 --- a/src/Psecio/Gatekeeper/UserGroupCollection.php +++ b/src/Psecio/Gatekeeper/UserGroupCollection.php @@ -50,7 +50,9 @@ class UserGroupCollection extends \Psecio\Gatekeeper\Collection\Mysql $this->getDb(), array('groupId' => $results[0]['id'], 'userId' => $model->id) ); - $this->getDb()->save($model); + if ($this->getDb()->save($model) === true) { + $this->add($model); + } } } } |