I’m doing some LDAP development in PHP and have run into some kind of, probably rookie, value assignment in PHP.
My issue is specific to LDAP_MODIFY, but is probably a generic issue. I’m trying to update an attribute and the following attribute gives me an attribute not found error:
$email = 'Whitegon024@thedomain.org';
$attributes = array( "userPrincipleName" => "$email");
But the following is successful:
$attributes = array( "userPrincipalName" => 'Whitegon024@thedomain.org') ;
If I do a print_r($attributes); of either I get:
Array
(
[userPrincipleName] => Whitegon024@thedomain.org
)
Anyone have a clue? I’m sure it’s something super simple.
You misspelled principal as principle in your first attempt… it has nothing to do with how you are assigning your variables.
To clarify –
attribute not founddoes not mean it’s seeing a null value for the indexuserPrincipalName– the LDAP server is saying the indexuserPrincipleNameitself doesn’t exist as an attribute of a principal’s LDAP record.