skip log in page

Mehr
6 Jahre 3 Monate her #102498 von Fabian
skip log in page wurde erstellt von 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

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

LimeSurvey Partners
Mehr
6 Jahre 3 Monate her - 6 Jahre 3 Monate her #102499 von Ben_V
Ben_V antwortete auf 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
<?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 />&nbsp;
        <br/>
                    <a href='http://<?php echo $where ?>/index.php/admin/authentication/sa/forgotpassword'>Forgot your password?</a><br />&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)
Letzte Änderung: 6 Jahre 3 Monate her von Ben_V.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
6 Jahre 3 Monate her #102501 von Fabian
Fabian antwortete auf 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 */
?>
...

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
6 Jahre 3 Monate her #102502 von Ben_V
Ben_V antwortete auf 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)
Folgende Benutzer bedankten sich: Fabian

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
6 Jahre 3 Monate her #102503 von Fabian
Fabian antwortete auf skip log in page
works! thanks!

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
6 Jahre 3 Monate her #102504 von Ben_V
Ben_V antwortete auf 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)

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
2 Jahre 2 Monate her #162662 von researchguru
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

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
2 Jahre 2 Monate her - 2 Jahre 2 Monate her #162665 von LouisGac
LouisGac antwortete auf 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.
Letzte Änderung: 2 Jahre 2 Monate her von LouisGac.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
2 Jahre 2 Monate her #162667 von researchguru
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.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
2 Jahre 2 Monate her #162669 von LouisGac
LouisGac antwortete auf 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

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
2 Jahre 2 Monate her #162682 von researchguru
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.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
4 Monate 5 Tage her #191703 von lstesting
lstesting antwortete auf 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?

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
4 Monate 4 Tage her #191740 von DenisChenu
DenisChenu antwortete auf skip log in page

researchguru schrieb: …

auto login should be like this: example.com/index.php/admin/authenticati...=admin&password=1234 , which does not work for me.

A permanent link for auto login by email :blink:

Since email are not secure by default : it's a serious security issue.

Else : all can be done with plugin : see gitlab.com/SondagesPro/coreAndTools/linkPasswordUser sample for 2.6lts

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
An error happen ? Before make a new topic : remind the Debug mode .

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Jetzt loslegen!

Melden Sie sich jetzt an, und erstellen Sie in wenigen Minuten Ihre erste Umfrage.

Account einrichten

Abonnieren Sie unseren Newsletter

Abonnieren Sie unseren Newsletter für alle Neuigkeiten rund um LimeSurvey
captcha