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.