Over a million developers have joined DZone.

Drupal 6: Defaulting To OpenID

·
Visually enable the OpenID login before the normal login.

Add this to template.php

 function garland_theme() {
  return array(
    'user_login' => array(
      'template' => 'user-login',
      'arguments' => array('form' => NULL),
    ),
    'user_register' => array(
      'template' => 'user-register',
      'arguments' => array('form' => NULL),
    ),
    'user_pass' => array(
      'template' => 'user-pass',
      'arguments' => array('form' => NULL),
    ),
    'user_login_block' => array(
      'template' => 'user-login-block',
      'arguments' => array('form' => NULL),
    ),    
  );
}


Add this to a new file called user-login.tpl.php 



Add this to a new file called user-login-block.tpl.php 



Add this to a new file called user-pass.tpl.php 

Visit your OpenID provider to recover your password. Then come back to this site and log in with your OpenID.


Add this to a new file called user-register.tpl.php 

Establish your OpenID with a provider like MyOpenId.com. Then come back to this site and log in with your new OpenID.



Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}