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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Providing Login block?


Go to End


6 Posts   3276 Views

Avatar
kenlomax

Community Member, 33 Posts

30 January 2007 at 4:14pm

I would like to provide part of my websites that are available to members only and they will be required to login. In one case I would like people to be able to self register, for another, I want to add members to the system myself.

Question 1: How do I get a login block to appear on my public pages?
Question 2: How do I restrict some pages to members only?

Thanks
Ken Lomax

Avatar
Sam

Administrator, 690 Posts

30 January 2007 at 6:30pm

The release coming out next week (v2.0.0, no beta!) will have better support for this; I'll reply to this once that's done...

Avatar
Enlightened_One

Community Member, 18 Posts

5 February 2007 at 9:46am

Edited: 05/02/2007 10:18am

Excellent. I have been looking forward to this new release.
###################
http://www.silverstripe.com/blog/
###################

Avatar
pouderStream

Community Member, 33 Posts

27 April 2007 at 4:30am

Any news on this feature?

I would actualy need only login into backend from frontend. I saw that inputs are Email and Password but what is the action(to send data to)?

This is not working...
/Security/?executeForm=LoginForm

Avatar
Sam

Administrator, 690 Posts

27 April 2007 at 1:42pm

There is a method called LoginForm() on ContentController.

This means that you can put $LoginForm anywhere on your page and it will create a login form for you.

Avatar
pouderStream

Community Member, 33 Posts

28 April 2007 at 1:08am

OK now...this works kind of... =)
I've been trying to figure out this, but it takes too much time :(, so any clue would be helpful.

Can u get more info on(any of that):
- How can I send user to: CMS(with $LoginForm works if I use <fieldset> in my code), some other page (login lets say), or the same page (with or without ajax)
- How to customize massages shown in ajax errors
- How to customize ajax actions itself

I have to write my own code for that, that's no problem, just tell me what do I have to subclass or what functions do I have to change.

I know I'm asking much here, but for now it seems to me that it is easier to write login function from scratch...witch would be bad becouse I see you got some cool functions in core for doing that.
Anyway any help would be great, tnx :)