OpenID as default state for Login block
kmv - August 12, 2007 - 01:11
| Project: | OpenID |
| Version: | 5.x-1.x-dev |
| Component: | OpenID Client |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
It would be nice to be able to specify whether or not you want the OpenID login or the Drupal login as the default state for the Login block.

#1
I'll second the request for this.
I had to remove the user_login_block from openid_form_alter since it wasn't working.
It would be nice to add an admin settings page with configurable options. Are there other options that would be useful at admin/settings?
#2
This is straying from the original request, but yeah:
#3
I have been hacking my own OpenID field as a block. Although I almost got there using the normal functionality and drupal_get_form() I was not able to mimic the behaviour like after an openid_form_alter(). I ended up adding a HTML block that was produced after Firefox's "View selected source" after I performed the openid_form_alter().
I am not sure why the following code as a block is not correctly working on Drupal6 though:
<?php
function openid_login_block() {
$form = array(
'#action' => url($_GET['q'], array('query' => drupal_get_destination())),
'#id' => 'user-login-form',
'#validate' => array('openid_login_validate'),
);
$form['openid_identifier'] = array(
'#type' => 'textfield',
'#title' => t('Log in using OpenID'),
'#size' => 14,
'#required' => TRUE,
'#maxlength' => 255,
'#weight' => -1,
'#description' => t('To post comments please log in using OpenID.'),
);
$form['openid.return_to'] = array(
'#type' => 'hidden',
'#value' => url('openid/authenticate', array('absolute' => TRUE, 'query' => drupal_get_destination())),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Log in'),
);
return $form;
}
global $user;
if (! $user->uid) {
drupal_add_css(drupal_get_path('module', 'openid') .'/openid.css', 'module');
drupal_add_js(drupal_get_path('module', 'openid') .'/openid.js');
print drupal_get_form('openid_login_block');
}
?>
Insight is welcomed.
#4
subscribe
#5
This should indeed be a configurable option.
I just marked the following issue as a duplicate:
http://drupal.org/node/309062
#6
+1
#7
+1