Drupal 7: LDAP: How to fetch user information on a webform
Figure out the raw ldap queries you need. Outside of php or drupal.
Write them down.
Use ldap views module to make reusable drupal ldap queries. ldap views can use tokens and I think parameters in queries ... parameterize as needed.


Then wherever you want your custom message embed the view results onto the page using Context, Panels, hook_page_build .... whatever.