link to pass other login variables to cmsb login

7 posts by 3 authors in: Forums > CMS Builder
Last Post: March 9, 2009   (RSS)

By markr - February 25, 2009

Is it possible to create a link to pass the login variables (from 3rd party security script) to the cmsb admin login, and automatically log into cmsb?

The other variables are easily reused ($username and $password) and I would make sure their values matched that of cmsb's login variables.

Thanks in advance...your support team is great.

Re: [markr] link to pass other login variables to cmsb login

By Dave - February 25, 2009

Hi Markr,

Yes, you can automatically login with a link like this:
admin.php?username=yourName&password=yourPassword&action=loginSubmit

Note that GET urls such as this (with values in the url) may be logged in your web server's logs and webstats pages, so make sure those are not publicly accessible.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [markr] link to pass other login variables to cmsb login

By markr - February 28, 2009

The link works when I hard code the name and password...

[font "Verdana"]admin.php?username=bob&password=123abc&action=loginSubmit


...but not with php variables...

admin.php?username=<? php echo $username ?>&password...

Will it work with variables?

Re: [markr] link to pass other login variables to cmsb login

By Dave - March 2, 2009

I'll just add that the first step is to just get those variable printing out. Try viewing source and seeing what shows in the link.

If you post the link feel free to replace some of the characters so you're not posting your actual username and password...
Dave Edis - Senior Developer
interactivetools.com

Re: [markr] link to pass other login variables to cmsb login

By markr - March 7, 2009

Works great. Clients love this. Your link was fine...I had merely forgotten the echo function.

The full link in case others want to see

<a href="http://www.mysite.com/cmsAdmin/admin.php?username=<?php echo $username ?>&password=<?php echo $password ?>&action=loginSubmit">Page Content</a>

Re: [markr] link to pass other login variables to cmsb login

By Dave - March 9, 2009

Thanks for posting back, and glad to hear it's working! :)
Dave Edis - Senior Developer
interactivetools.com