Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Drupal 6: Defaulting To OpenID

DZone's Guide to

Drupal 6: Defaulting To OpenID

·
Free Resource
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:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

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

{{ parent.tldr }}

{{ parent.urlSource.name }}