Login | Forgot password | Register

X

What is OpenID?

OpenID is an Internet-wide identity system that allows you to sign in to many websites with a single account.

With OpenID, your ID becomes a URL (e.g. http://username.myopenid.com/). You can get a free OpenID for example from myopenid.com.

For more information visit the official OpenID site.

Jump to:

17478 Posts in 4473 Topics by 1972 members

Archive

SilverStripe Forums » Archive » login widget: how change redirect page

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

Page: 1
Go to End
Author Topic: login widget: how change redirect page 1414 Views
  • ojalà
    avatar
    Community Member
    87 posts

    login widget: how change redirect page Link to this post

    Hi!
    I need using log in widget. when I log on I nedd to enter in a reserved page. Where is the point in login widget where I control the page that is show after login? I'm unable to find this point..
    thanks

  • Nivanka
    avatar
    Community Member
    337 posts

    Re: login widget: how change redirect page Link to this post

    I think with a little hack you should be able to do this.

    just open the LoginWidget.ss and find the hidden input which has the id LoginWidget_BackURL

    just update the value with the URL you prefer to redirect.

    it should work in that way

  • bebabeba
    avatar
    Community Member
    111 posts

    Re: login widget: how change redirect page Link to this post

    Hi!
    thanks for reply! I try to change
    id="LoginWidget_BackURL"
    with
    id="http://mysite.com/new-page/"
    but nothing change.
    I have my login widget inside blog and when I log I return in blog page.
    I sow in documentation how add login widget in a normal page (default widget are applied to blog) but I pass to this step if login widget behaviour change to my purpouse.

  • LeeUmm
    avatar
    Community Member
    372 posts

    Re: login widget: how change redirect page Link to this post

    You need to change the value for the input.

    Should look something like this:

    <input type="hidden" id="backURL" name="BackURL" value="/new-page/" />

  • Nivanka
    avatar
    Community Member
    337 posts

    Re: login widget: how change redirect page Link to this post

    yes! that way it should work

  • bebabeba
    avatar
    Community Member
    111 posts

    Re: login widget: how change redirect page Link to this post

    Sorry but don't work.
    When I log out, I log out not only from my page but also from my CMS.
    I need to esc only from my page..Login widget is applies to my home page to ente in a reserved page (page 1) so when I log out I must return to homepage

  • LeeUmm
    avatar
    Community Member
    372 posts

    Re: login widget: how change redirect page Link to this post

    Yes, logging out will also log you out of your admin session. They're both the same. Would probably get complex to edit different ones.

    You asked how to redirect a user after logging in, which we showed you. If you now want to redirect a user after logout, I'm not too sure to be honest. I don't believe there is anything by default. When you logout, it redirects you back to the page you were on.

    This is handled in /sapphire/security/security.php and other files in that directory.

    Might want to look at editing/extending that I suppose, unless there is an easy way, like setting the value of a hidden input that I'm not aware of.

    1414 Views
Page: 1
Go to Top

Currently Online: BigChris, Euphemismus

Welcome to our latest member: GreenWork

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

Comments on this website? Please give feedback.