Drupal login using url login and password

In our application, we would like to make a link to the online help site created using Drupal.

The problem is that this site is password protected. We would like to specify the username and password in the URL so that the login is automatically created when the user clicks on the link in our application.

Is it possible and how?

+5
source share
3 answers

Well, doing what you want (I think) can be done using the Autologin module for drupal ( http://drupal.org/project/autologin ) however this is seriously not recommended for use, as this obviously means that usernames and passwords are visible in the URL, as well as in any access logs. Therefore, the project was discontinued, not even sure that it will work in the latest drupal version.

Unfortunately, since the drupal form-generating mechanism has XSS protection, it prevents sending directly to the login page and hopes for the best.

There are a number of existing Single Sign On (SSO) solutions for drupal, although most of them integrate with another existing CMS or similar.

- , - , , , , drupal .

+4

Autologin - Securesite, , , .

+4

Login to an external site

A case on the same server and an attempt from any repository on the same path

like / store

define('DRUPAL_ROOT','D:/wamp/www/drupal');

require_once '../includes/bootstrap.inc';

drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

global $user;

//change this line and put your username and password instead of 'admin' and 'password'

$account = user_authenticate('krishana', 'hiddens');

$user = user_load($account, TRUE);

drupal_session_regenerate();
0
source

All Articles