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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

Can I do this? (SOLVED)


Go to End


3 Posts   1527 Views

Avatar
TerryMiddleton

Community Member, 108 Posts

29 July 2009 at 8:21am

Edited: 30/07/2009 10:44am

Can I create a function that forces a login and redirects to a specific location/page?

Here's the login call via a URL:

(site)/Security/LoginForm&action_dologin=1&Email=(email)&Password=(password)

Can I just call dologin and pass the email & password then do a redirect?

I'm not sure how to do this?

Do I create a class first:

class userautologin {}

function autologin {

dologin('email','password');
redirect;
}

Thoughts

Terry

Avatar
swaiba

Forum Moderator, 1899 Posts

7 August 2010 at 5:46am

Found this and see that is is solved... any chance of saying how it was solved please because I am interested in this.

Avatar
swaiba

Forum Moderator, 1899 Posts

7 August 2010 at 6:30am

Edited: 07/08/2010 6:31am

Nevermind I worked it out... I add... &BackURL=REQUIREDURL to the URL