Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Providing Login block?

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

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

Page: 1
Go to End
Author Topic: 2833 Views
  • kenlomax
    Avatar
    Community Member
    33 Posts

    Providing Login block? Link to this post

    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

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: Providing Login block? Link to this post

    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...

  • Enlightened_One
    Avatar
    Community Member
    18 Posts

    Re: Providing Login block? Link to this post

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

  • pouderStream
    Avatar
    Community Member
    33 Posts

    Re: Providing Login block? Link to this post

    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

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: Providing Login block? Link to this post

    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.

  • pouderStream
    Avatar
    Community Member
    33 Posts

    Re: Providing Login block? Link to this post

    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

    2833 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.