ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Automatic Login

February 24, 2009 2:46am

Subscribe [3]
  • #1 / Feb 24, 2009 2:46am

    eeprci

    2 posts

    Is there a way to login a particular user using template (or php) code without actually submitting a login post?

    Why do I want to do this? I would like to adjust available features at my site based on how the site was reached so, if reached from site A, you get user “A”‘s profile; site “B”, user “B”, etc. I would maintain control over the users.

    Thanks.

  • #2 / Feb 24, 2009 3:22am

    John Henry Donovan

    12339 posts

    eeprci,

    There is no way of logging in a user without them knowing. What you are referring to are landing pages

    I am going to move this one the “How To” as you might get some more interaction on how to approach what you want to achieve.

    I would suggest also looking at the Referrer Module. There are variables available with it that you might be able to check against.

    EE Docs : Referrer Module Tags

  • #3 / Feb 24, 2009 5:43am

    NielsG

    21 posts

    I have used a session tracker before to ‘see’ where a user comes from. It simply displays the last url someone has been.
    Obviously this only works if you know the url’s people might come from so you can check them against your profiles.
    http://expressionengine.com/docs/development/usage/session.html#tracker

  • #4 / Feb 24, 2009 5:50am

    Mark Bowen

    12637 posts

    Although there is no built-in way of doing this out of the box there is indeed a way of doing this but you would probably want to make sure that no-one gets hold of the URL for another persons login although that all depends on what you need this for really.

    If you take a look at the LogMeIn plugin then you should be able to do what you need very easily.

    Hope that helps a bit.

    Best wishes,

    Mark

  • #5 / Feb 24, 2009 7:58am

    eeprci

    2 posts

    Mark,

    This is perfect. Thanks a bunch. Security is really not an issue, the world should never see the info, but thanks for the warning.

  • #6 / Feb 24, 2009 8:02am

    Mark Bowen

    12637 posts

    Mark,

    This is perfect. Thanks a bunch. Security is really not an issue, the world should never see the info, but thanks for the warning.

    No problem at all. Glad to have been of assistance. It’s a really good little plugin that one.

    Best wishes,

    Mark

  • #7 / Feb 24, 2009 8:05am

    eeprci

    2 posts

    BTW,

    If I set “expire” to 0 (zero), is that the same as having the logout occur when the browser is closed?

    Vernon

  • #8 / Feb 24, 2009 8:25am

    Mark Bowen

    12637 posts

    BTW,

    If I set “expire” to 0 (zero), is that the same as having the logout occur when the browser is closed?

    Vernon

    I’m not too sure on that one but you could always give it a try and see 😉

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases