Closed Arkantium closed 7 months ago
Environment: ActiveDirectory LdapRecord 3.1.2
Describe the bug: Hi,
In your documentation, you write:
if ($user->groups()->detach($group)) { // Successfully removed the group from the user. }
But it's not possible to use an if statement on the deletion of a user's group because this method is an void and does not have return
public function detach(mixed $model): void { if (is_iterable($model)) { array_map($this->detach(...), [...$model]); return; } $this->attemptFailableOperation( $this->buildDetachCallback($model), $this->bypass['detach'], $model ); }
https://ldaprecord.com/docs/core/v3/active-directory/users/#removing-groups
Thanks! I've just patched this 👍
https://github.com/DirectoryTree/LdapRecord-Docs/commit/036f56a2eb05768669c48c2d5e66ebcaa81026a1
Environment: ActiveDirectory LdapRecord 3.1.2
Describe the bug: Hi,
In your documentation, you write:
But it's not possible to use an if statement on the deletion of a user's group because this method is an void and does not have return
https://ldaprecord.com/docs/core/v3/active-directory/users/#removing-groups