Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

skip log in page

  • Fabian
  • Fabian's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 3 months ago #102498 by Fabian
skip log in page was created by Fabian
Hi!

is it possible to skip the log in page / the admin module? I use LS on a tablet offline and I´m the only user, so the log in process is not necessary. Is there a simple way to achieve this (I´m not a developer)?

cheers,
Fabian
The topic has been locked.
More
10 years 3 months ago - 10 years 3 months ago #102499 by Ben_V
Replied by Ben_V on topic skip log in page
Hello,

1) Create an "myaccess.php" file
2) Copy the following code and edit the 3 first variables (username, password & path)
3) Place the file somewhere on your server and access the file via your browser
Code:
<?php 
$username = 'admin';
$password = 'password';
$where = 'example.org/limesurvey';  /* yourdomain.tld/your_folder   */
?>
 
<head><title>Skip LS Login</title>
<meta charset="utf-8"><meta name="robots" content="none" />
<!--  Change for your correct path to jquery file -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
</head>
 
<form id="loginform" name="loginform" action="http://<?php echo $where ?>/index.php/admin/authentication/sa/login" method="post">
<div class='messagebox ui-corner-all'>
        <div class='header ui-widget-header'>Please log in first.</div>
        <br />
        <ul style='width: 500px; margin-left: auto; margin-right: auto'>
            <li><label for='user'>Username</label>
                <input name='user' id='user' type='text' size='40' maxlength='40' value=<?php echo $username ?>  /></li>
            <li><label for='password'>Password</label>
                <input name='password' id='password' type='password' size='40' maxlength='40' value=<?php echo $password ?> /></li>
            <li><label for='loginlang'>Language</label>
<select id='loginlang' name='loginlang' >
<option value='en' selected>English</option>
</select>
            </li>
        </ul>
    <p><input type='hidden' name='action' value='login' />
        <input class='action' type='submit' value='Login' /><br />&amp;nbsp;
        <br/>
                    <a href='http://<?php echo $where ?>/index.php/admin/authentication/sa/forgotpassword'>Forgot your password?</a><br />&amp;nbsp;
                </p><br />
    </div>
</form>
 
<script  type="text/javascript" >
jQuery(document).ready(function($) {
document.loginform.submit();});
</script>
 

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Last edit: 10 years 3 months ago by Ben_V.
The topic has been locked.
  • Fabian
  • Fabian's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 3 months ago #102501 by Fabian
Replied by Fabian on topic skip log in page
Hi,

thanks for your quick response!
I created the "myaccess.php" as described. When I open the file via my browser the Skip LS Login page appears. So is it still necessary to log in? The only convenience would be not entering username and password... However, when I try to log in the error message "server not found" shows up (the tablet works offline with a local webserver).

thats what I changed in the php file:
<?php
$username = 'admin';
$password = '12345';
$where = 'http://localhost:8080/bef1/limesurvey'; /* yourdomain.tld/your_folder */
?>
...
The topic has been locked.
More
10 years 3 months ago #102502 by Ben_V
Replied by Ben_V on topic skip log in page
replace
$where = 'http://localhost:8080/bef1/limesurvey';

with
$where = 'localhost:8080/bef1/limesurvey';

Note:
1) for jquery (only necesary for autosubmission) you can try to link to your local file:
<script type="text/javascript" src=http://<?php echo $where ?>/scripts/jquery/jquery.js></script>

2) this code normally works for ≥2.00 LS versions and must be adapted for previous releases (eg. 1.92)

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
The following user(s) said Thank You: Fabian
The topic has been locked.
  • Fabian
  • Fabian's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 3 months ago #102503 by Fabian
Replied by Fabian on topic skip log in page
works! thanks!
The topic has been locked.
More
10 years 3 months ago #102504 by Ben_V
Replied by Ben_V on topic skip log in page
you're welcome :)

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
The topic has been locked.
More
6 years 2 months ago #162662 by researchguru
Replied by researchguru on topic skip log in page
Hi,

Does anyone know how to pass parameters (user/password) through URL? I have tried https://mylink/index.php/admin/authentication/sa/login?user=admins&password=1234 but it did not work.

Thanks
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
6 years 2 months ago - 6 years 2 months ago #162665 by LouisGac
Replied by LouisGac on topic skip log in page
researchguru:

In url you can pass parameter for a get request.
To post datas, you must use a form.

www.w3schools.com/tags/ref_httpmethods.asp

BTW: the message you just bump was 4 years old. I suggest you filter your google search using the date parameter (less than one year). In general, it should give you more pertinent results.
Last edit: 6 years 2 months ago by LouisGac.
The topic has been locked.
More
6 years 2 months ago #162667 by researchguru
Replied by researchguru on topic skip log in page
Thank you LouisGac,

Basically, www.w3schools.com says the link for auto login should be like this: example.com/index.php/admin/authenticati...=admin&password=1234 , which does not work for me.
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
6 years 2 months ago #162669 by LouisGac
Replied by LouisGac on topic skip log in page
well...

I was not saying that but indeed what I was saying do not apply to LS since we allow autologin by url params....
:confused:

For one time password:
manual.limesurvey.org/Manage_users#Use_one-time_passwords
The topic has been locked.
More
6 years 2 months ago #162682 by researchguru
Replied by researchguru on topic skip log in page
Thanks, "one-time password" is not a suitable option for us, as we want to use it permanently. Also, I searched on Limesurvey forums, and couldn't find any new post related to this issue.
The topic has been locked.
More
4 years 3 months ago #191703 by lstesting
Replied by lstesting on topic skip log in page
I'm very interested in a quick solution to skip the login page like this one but it seems like in version 3.19.1 of Limesurvey Ben_v code is not working anymore, as it's redirecting to the LS login page instead. Does anyone know how to update the code for use with this version?
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose