DirectoryTree / LdapRecord-Laravel

Multi-domain LDAP Authentication & Management for Laravel.
https://ldaprecord.com/docs/laravel/v3
MIT License
512 stars 54 forks source link

[Bug] ldap_delete(): Delete: Operation not allowed on non-leaf #627

Closed vatsake closed 9 months ago

vatsake commented 9 months ago

Environment:

Describe the bug:


use LdapRecord\Models\ActiveDirectory\User as ActiveDirectoryUser;
class User extends ActiveDirectoryUser {

}

$user = User::where('objectGuid', '=', hexToBin($id))->firstOrFail();
// User exists
$user->delete();

This gives error: ldap_delete(): Delete: Operation not allowed on non-leaf

image

*EDIT It's weird. I can delete other users, but I'm having problems with 2 users.

vatsake commented 9 months ago

I guess i need to use the 'delete recursively' parameter. image