Commit c23349ec authored by jiangbowen's avatar jiangbowen

add attr

parent d43a8232
......@@ -125,6 +125,20 @@ class LdapController extends Controller
$user->setDn("cn={$value},{$dept_name},ou=Users_hoto,dc=hoto,dc=test"); //在IT发展部新增人员
$user->setAccountName("$value");
$user->setCommonName("$value");
//属性设置
//登陆状态默认启用 544默认启用 66080密码永不过期
$user->setUserAccountControl(544);
//邮箱
$user->setAttribute('mail','test@qq.com');
//联系方式
$user->setAttribute('telephoneNumber','13802266892');
//姓
$user->setAttribute('sn','first name...');
//名
$user->setAttribute('givenName','last name...');
//显示名称
$user->setAttribute('displayName','test');
if($user->create()){
Log::info("{$value} created success....");
} else {
......
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