IdMLDAPAuthenticate - loginAuthenicate - custom actions

Hi all, 

The login itself works.

I want to perform customised actions when a user logs in via LDAP, e.g. check if the user is in a specific AD Group do this, if in another AD group do that.

The file where I tried to start is the loginAuthenticate function of the class IdMLDAPAuthenticate  (sugarcrm/modules/Users/authentication/IdMLDAPAuthenticate/IdMLDAPAuthenticate.php)

I created a custom class where I overwrite the function - this function gets called and login works

class CustomIdMLDAPAuthenticate extends IdMLDAPAuthenticate { ... }

 

But I don't know how to get the infos from AD into this function without building a complete new LDAP request.

Can anyone help?


Best Regards

Sven