I'm using the LDAP driver but found the "or die()"
error reporting sort of annoying. I fixed this by
logging the errors to an errormsg variable and
returning false. The developer can check for a false
return and retrieve the error message via
$ldap->ErrorMsg().
LDAP error reporting and spacing cleanup