Community

Forward login-data from D7 to D6 platform

We have a main D7-website and a project management (open atrium) D6-subsite.

Users must be able to login to the d6-subsite from within the d7-website.

We already created a custom loginbar on the D7-website, but are in search of how to forward these data to the d6-subsite ...

Hereby the code used for the custom login bar:

/**
* Customise standard user login menu
*/

function horizontal_login_block($form) {
  $form['#action'] = url($_GET['q'], array('query' => drupal_get_destination()));
  $form['#id'] = 'horizontal-login-block';
  $form['#validate'] = user_login_default_validators();
  $form['#submit'][] = 'user_login_submit';
  $form['#prefix'] = '<div id="loginbar">';
  $form['#suffix'] = '</div>';
  $form['links'] = array(
   '#prefix' => '<div class="registrationlinks">',
   '#suffix' => '</div>',
   '#type' => 'markup',
   '#markup' => l(t('Register account'), 'user/register'),
  );
  $form['name'] = array(
    '#type' => 'textfield',
    '#prefix' => '<div class="usericon">',
    '#suffix' => '</div>',
    '#maxlength' => USERNAME_MAX_LENGTH,
    '#size' => 15,
    '#required' => TRUE,
    '#default_value' => 'Username',
    '#attributes' => array(
      'onblur' => "if (this.value == '') {this.value = 'Username';}",
      'onfocus' => "if (this.value == 'Username') {this.value = '';}"
     ),
  );
  $form['pass'] = array(
   '#type' => 'password',
   '#maxlength' => 60,
   '#size' => 15,
   '#required' => TRUE,
   '#prefix' => '<div class="passicon">',
   '#suffix' => '</div>',
  );
 
  $form['actions'] = array(
    '#type' => 'actions'
  );
  
  $form['actions']['submit'] = array(
    '#type' => 'submit',
    '#value' => ''
  );
 
 

  return $form;
}

We think this can be done with hook_alter and actions ? An iframe could be a solution as well though we would prefer server side solutions.
Main website is on www.mainwebsite.com, subsite on projects.mainwebsite.com.

Anyone can help?

Comments

Anyone can help? Note: users

Anyone can help?
Note: users on D7 website don't exist, only on the d6 website. So login information entered in D7 must be forwarded directly to D6.