Is there a way to force the users to use OpenID (e.g. Google, Facebook, Twitter) and not use Drupal's internal authentication?
1 Answer
I simple solution would be to alter the login form to remove the username and password fields.
Here is some sample code to get you started:
/**
* Alter the login form page
*/
function MYMODULE_form_user_login_alter(&$form, &$form_state, $form_id) {
_MYMODULE_alter_login_form($form);
}
/**
* Alter the login form block
*/
function MYMODULE_form_user_login_block_alter(&$form, &$form_state, $form_id) {
_MYMODULE_alter_login_form($form);
}
/**
* Function to change a bunch of things in the user_login form (both the block
* and login screen).
*/
function _MYMODULE_alter_login_form(&$form) {
unset($form['name']);
unset($form['pass']);
}
Unfortunately I don't know of any contrib modules that will do this for you; the good news is that I have wrote 95% of the module for you. ;)