Commit d43a8232 authored by 张育槟's avatar 张育槟

优化部门功能

parent 608a99bb
......@@ -182,7 +182,7 @@ class LdapController extends Controller
$ous[] = "ou={$value}";
}
$ou_str = implode(',',$ous);
$result=$this->provider->search()->setDn("$ou_str,ou=IT发展部,ou=Users_hoto,dc=hoto,dc=test")->find($v);
$result=$this->provider->search()->setDn("$ou_str,ou=Users_hoto,dc=hoto,dc=test")->find($v);
// $dn = $result->getDnBuilder();->ous()
// $dn->addOu("$ou_str,ou=department,dc=test,dc=com");
// var_dump($ou_str);die;
......@@ -205,7 +205,7 @@ class LdapController extends Controller
$ous[] = "ou={$value}";
}
$ou_str = implode(',',$ous);
$ou->setDn("$ou_str,ou=IT发展部,ou=Users_hoto,dc=hoto,dc=test");
$ou->setDn("$ou_str,ou=Users_hoto,dc=hoto,dc=test");
if($ou->create()){
Log::info("{$value} created success....");
} else {
......@@ -255,7 +255,7 @@ class LdapController extends Controller
// var_export($depts[0]);
$result=$this->provider->search()->ous()->find($depts[0]);
// var_export($result);die;
$result->setDn("$ou_str,ou=IT发展部,ou=Users_hoto,dc=hoto,dc=test");
$result->setDn("$ou_str,ou=Users_hoto,dc=hoto,dc=test");
// var_dump($result);die;
if ($result->exists) {
$result->rename("ou=".$hou_depts[0]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment