Commit b27708b5 authored by jiangbowen's avatar jiangbowen

test conn

parent b50c2413
......@@ -101,6 +101,7 @@ class LdapController extends Controller
{
if (empty($data)) return;
foreach ($data as $key => $value) {
if (is_numeric($key)) continue;
$user=$this->provider->search()->find($key);
if ($user->exists) {
$user->rename("cn=$value");
......@@ -191,6 +192,9 @@ class LdapController extends Controller
if (is_null($result)) return;
if ($result->exists) {
$result->delete();
Log::info("{$value} delete success....");
}else{
Log::info("{$value} not exist....");
}
}
}
......@@ -219,6 +223,9 @@ class LdapController extends Controller
// var_dump($result);die;
if ($result->exists) {
$result->rename("ou=".$hou_depts[0]);
Log::info("{$value} edit success....");
} else{
Log::info("{$value} not exist....");
}
}
// $this->saveDept($handleData);
......
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