21309 Posts in 5738 Topics by 2603 members
General Questions
SilverStripe Forums » General Questions » Adding user to LDAP when added through CMS? (Hooks/Event Handling?)
General questions about getting started with SilverStripe that don't fit in any of the categories above.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 805 Views |
-
Adding user to LDAP when added through CMS? (Hooks/Event Handling?)

8 October 2009 at 2:35pm Last edited: 8 October 2009 2:36pm
I want to add a new user to LDAP when they are added in the Admin interface. This could be done using triggers but I'd rather not go down that path. Any ideas how to implement this?
Ideally I'd just listen/subscribe to Member::onBeforeWrite() :/
-
Re: Adding user to LDAP when added through CMS? (Hooks/Event Handling?)

8 October 2009 at 2:55pm
Looks like I can do this by using
function onAfterWrite() {
(do stuff)
parent::onAfterWrite();
}on my Member's DataObjectDecorator. Still need to check have access to all the data tho...
-
Re: Adding user to LDAP when added through CMS? (Hooks/Event Handling?)

8 October 2009 at 8:20pm
Yes, that's exactly how you would do it. Alternatively you could also remove the SilverStripe Security section and directly check member credentials via LDAP. That would only be useful if you already have a way to create your users on the LDAP Server though. With this approach you would prevent duplicate users (in SilverStripe DB and LDAP) and reduce synchronization issues.
| 805 Views | ||
|
Page:
1
|
Go to Top |

