Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Deleted Members can still login


Reply

5 Posts   769 Views

Avatar
TerryMiddleton

13 May 2009 at 5:19am Community Member, 108 Posts

I have manually deleted several members from the security tab on SS. However they can still login?

Is there something else I need to do like purge the members or what?

Also, is there a way to programmatically delete a memeber?

Thanks,

Terry (almost going live with my first site in SS) Middleton

Avatar
TerryMiddleton

13 May 2009 at 8:24am Community Member, 108 Posts

Just found out that you can't manually delete a member. If you delete a member from a group, that member isn't *really* deleted from the database.

After considering the scope of a delete, that sounds correct and would void the need for groups, right?

So, the important thing to remember is if you want to restrict someone on your website, do the restriction by group and not by member.

I do a <% if CurrentMember %>

stuff...

<% end_if %>

I would need to do something like <% if CertainGroup(id) %> (I don' t exactly know the syntax of variable)

Does anyone know how to reference a certain group the user is in on a page? I don't see that option on Built-In-Page-Controls:

http://doc.silverstripe.com/doku.php?id=built-in-page-controls&s=page

Let me know,

Terry

Avatar
Ben Gribaudo

15 May 2009 at 6:41am Community Member, 181 Posts

There is a ticket for this bug:
http://open.silverstripe.com/ticket/1434

Avatar
Howard

17 May 2009 at 10:24am Community Member, 215 Posts

Hi Terry,

Sorry to hijack the thread but wondered how you went with building a registration form that then gets checked by admins before the users are added. I've got to build something similar and wondered if you had any tips :)

Thanks,
Howard

Avatar
TerryMiddleton

18 May 2009 at 3:00am Community Member, 108 Posts

howardgrigg,

Actually, I was able to do this.

Here is what I do. I added a field called AccountEnabled and it's a boolean. When the user first registers I add them to a group and do not set the AccountEnabled. So they are disabled (0) until someone approves them (or enables the account)

If they try to register again, I check to see if the email is in the db and what the AccountEnabled field is set to. If disabled, I tell them that their account is still being reviewed.

If it is enabled then I send them an email with their login information.

If they try to login, I check to see if the account is enabled or disabled. If it is disabled, I don't let them login.

I hope this helps.

Terry