Commit 3387e307 authored by jiangbowen's avatar jiangbowen

test conn

parent 35022305
......@@ -55,7 +55,7 @@ class LdapController extends Controller
foreach ($data as $key => $value) {
$entry=["cn"=>"{$value}"];
$user=$this->provider->make()->user($entry);
$user->setDn("cn={$value},ou=IT发展部,ou=Users_hoto,dc=test,dc=com");
$user->setDn("cn={$value},ou=IT发展部,ou=Users_hoto,dc=hoto,dc=test");
$user->setAccountName("$value");
$user->setCommonName("$value");
if($user->create()){
......@@ -108,7 +108,7 @@ class LdapController extends Controller
$ous[] = "ou={$value}";
}
$ou_str = implode(',',$ous);
$result=$this->provider->search()->setDn("$ou_str,ou=department,dc=test,dc=com")->find($v);
$result=$this->provider->search()->setDn("$ou_str,ou=department,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;
......
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