17452 Posts in 4473 Topics by 1971 members
Page: 1 2
|Go to End||Next >|
26 April 2008 at 3:51pm Last edited: 26 April 2008 3:51pm
I want to add a member state (active, inactive, banned) which gets checked on login. The value is only set by the admin in the cms and is never visible to public. I have got this bit happening no worries.
So if the member tries to login it checks the account to see which state it is in and acts appropriately.
Where should i start to look for this?
27 April 2008 at 12:37pm
28 April 2008 at 9:45pm Last edited: 28 April 2008 9:46pm
I would implement a DataObjectDecorator.
Then add it as a role to Member
so that this 'member state' is only shown if a 'administor' is logged in...
28 April 2008 at 10:28pm
I have already decorated the member to include the member state.
I now need to workout how to extend the authenticator classes to get it to check the member state.
29 April 2008 at 12:05am Last edited: 29 April 2008 12:10am
i'm not sure why there's a need for a special authenticator?
DataObjectDecorator can define default for field-values
fe: 'active' for your 'member state'.
then someone could fe. 'special implement'
SiteTree::canEdit() for pages,
if these Memers are canCMS Members.
Additionally you could generate getCMSFields on your classes, depending on member state...
And only for restrictions about frontend users (members)
i could do things specially while frontend rendering, depending on your member state.
what is the missing part, so where's the need for an authenticator?
29 April 2008 at 12:12am
Because, won't that still log them in and just block them from seeing certain content?
I want them to be blocked from logging in but not have to remove them as members.
29 April 2008 at 12:28am
i thought about
'why not let him log in, if then, there's nothing he can do?'
which means i'ld throw
in any controller, if he's not 'active'.
so it wouldn't matter that he is logged in...
i could additionally show him 'you're blocked' in his member profile...
29 April 2008 at 11:16am Last edited: 29 April 2008 11:18am
Actually that is a good idea Helmut, that would make customising the message that they get much easier.
It would also allow them to take the right steps to have the ban removed but delivering custom messages through to them in their profile page.
Page: 1 2
|Go to Top||Next >|