开发者

Symfony bhLDAPAuthPlugin doubt

开发者 https://www.devze.com 2023-04-08 20:55 出处:网络
i\'m working ona Symfony project and using the bhLDAPAuthPlugin to connect my app with the Company\'s Active Directory.

i'm working on a Symfony project and using the bhLDAPAuthPlugin to connect my app with the Company's Active Directory.

Its a nice plugin, easy to install and use, but i need to customize it. I have to add one parameter to the login form (i've already done this) and assign its value to the user if login succeeds (that is my trouble) but have no idea where are the user object's values assigned.

Structure of the folders and filenames are a l开发者_Go百科ittle confusing and i don't know where to search. Please if some of you have worked with this plugin sure you can help me! i hope to have explained me well.

Thank you very much for your time!


I have no knowledge about this specific plugin, but I just looked in the source.

But the authentication is handled in /plugins/bhLDAPAuthPlugin/modules/bhLDAPAuth/actions/actions.class.php. In the executeSignin() to be specific, a form is created (by default a bhLDAPAuthFormSignin), and presented to the user. On POST this form is validated, and when valid, it calls the signIn($user, $remember) function on the user class.

The user class is defined apps/<yourapp>/lib/myUser.php, and probably inherits from bhLDAPAuthSecurityUser, defined in /plugins/bhLDAPAuthPlugin/trunk/lib/user/bhLDAPAuthSecurityUser.class.php.

You can override the signIn() method from bhLDAPAuthSecurityUser in myUser, setting your own properties, after calling the parent signIn().

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号