Skip to content
Browse files

Remove undefined index notice

  • Loading branch information...
1 parent fb92cd2 commit b124651ad4151190e352e4fb3fb355cb2a21fc3e @ekohl ekohl committed Jun 24, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 libraries/Adldap.php
View
4 libraries/Adldap.php
@@ -906,7 +906,9 @@ public function user_create($attributes){
// Set the account control attribute
$control_options=array("NORMAL_ACCOUNT");
- if (!$attributes["enabled"]){ $control_options[]="ACCOUNTDISABLE"; }
+ if (!array_key_exists('enabled', $attributes) || !$attributes["enabled"]) {
+ $control_options[]="ACCOUNTDISABLE";
+ }
$add["userAccountControl"][0]=$this->account_control($control_options);
//echo ("<pre>"); print_r($add);

0 comments on commit b124651

Please sign in to comment.
Something went wrong with that request. Please try again.