I am the wpmu ldap plugin author - and I am working on a way to better handle the lost password function. The ldap plugin now supports local and ldap users, so the trick is how to handle the both of them. See the attached patch for my proposed changes. This would then allow me to run the following function:
function ldapRetrievePassword($userID,$pass_error) {
$ldap_login = get_usermeta($userID, 'ldap_login');
if ($ldap_login == true) {
// get the configurable error message:
$pass_error = get_site_option('ldapGetPasswordMessage');
}
}
add_action('retrieve_password_error', 'ldapRetrievePassword',10,2);