BorisMorel/LdapBundle — pull request #116 by matason (2014-05-06 14:35:24+00:00)
Title: Check LDAP attribute exists before accessing it.

We're using the imag_ldap role configuration to load a role from our LDAP directory into $user->roles.

As the code stands now, it expects that all people in the LDAP directory have the 'name_attribute' attribute and attempts to add this regardless.

The isset() check prevents a PHP Notice when this scenario arises.