This commit is contained in:
parent
f395999403
commit
a956738da5
@ -27,6 +27,7 @@ $user = $conn->getTable('User')->find(5);
|
|||||||
$user->GroupUser
|
$user->GroupUser
|
||||||
->remove(0)
|
->remove(0)
|
||||||
->remove(1);
|
->remove(1);
|
||||||
|
$user->save();
|
||||||
</code>
|
</code>
|
||||||
|
|
||||||
This is due to a fact that $user->GroupUser loads all group links for given user. This can time-consuming task if user belongs to many groups. Even if the user belongs to few groups this will still execute an unnecessary SELECT statement.
|
This is due to a fact that $user->GroupUser loads all group links for given user. This can time-consuming task if user belongs to many groups. Even if the user belongs to few groups this will still execute an unnecessary SELECT statement.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user