Commit 8454a91b authored by 张育槟's avatar 张育槟

优化员工部门功能

parent b5b9b1f9
......@@ -116,6 +116,16 @@ class LdapController extends Controller
$dept_name='ou=IT发展部';
if(!empty($data['deptName'])){
$arr = explode('/',$data['deptName']);
foreach ($arr as $key => $v) {
// var_dump($result);
$depts[] = $v;
$depts2=array_reverse($depts);
foreach ($depts2 as $key => $value) {
$ous[] = "ou={$value}";
}
$dept_name = implode(',',$ous);
}
$dept_name='ou='.$data['deptName'].','.$dept_name;
}
foreach ($data['data'] as $key => $users) {
......
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