Update LDAP.class.php

Modify SQL user creation to properly update ID fields between contact and user tables
Change default user type from anon to project worker so all ldap users get basic permissions. In the future, this should be pulled from a configuration option
Add contactId function in order to aid in recursive dependency on user and contact id's.