Auto Login

Hi,

I’m using SC6 with the built in security module, which is great:-)

Does anybody know how difficult it would be to write an auto login page which would bypasses the normal “manual” logon page? I guess that there are quite a few session vars that would need to be populated during the logon process. Essentially what I’m asking is, is this feasible?

Any help would be appreciated.

Thanks,

Mike

Re: Auto Login

Anyone?

Hi mikew,
You can use your own script to make an auto-login script based on the security module in SC. But in this example i will show you how to make something similar “Auto Pre-Capture user and password on login form” if you want something simple.

[SIZE=5]Auto Pre-Capture user and password on login form using cookies[/SIZE]

[LIST=1]

  • Lest suppose that your user and password values are stored in a cookie ( You can use GET, POST, SESSION or COOKIES, in this example we are using cookies )
  • Then we assing the value of the cookie to login and pswd variables [B]OnLoad [/B]event to populate the login form of the security module:
    {login}=$_COOKIE["user"];
    {pswd}=$_COOKIE["pswd"];
    

    [/LIST]

    Note: i strongly recommend to avoid using the plain password stored in a cookie;