function sms_user_auth() interferes with hook_auth

vanvemden - February 9, 2009 - 01:10
Project:SMS Framework
Version:5.x-1.1
Component:SMS User
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

All of a sudden in noticed that my user registration form contains a message 'Note: if you have an account with one of our affiliates (), you may login now instead of registering.'.

After doing some research it seems to me that function sms_user_auth($number) interferes with hook_auth($username, $password, $server). When function user_register() in user.module checks for affiliates (see below):

$affiliates = user_auth_help_links();
  if (!$admin && count($affiliates) > 0) {
    $affiliates = implode(', ', $affiliates);
    $form['affiliates'] = array('#value' => '<p>'. t('Note: if you have an account with one of our affiliates (!s), you may <a href="@login_uri">login now</a> instead of registering.', array('!s' => $affiliates, '@login_uri' => url('user'))) .'</p>');
  }

the user_auth_help_links() (see below) returns an array because sms_user_auth($number) responds when the 'auth' hook is called.

function user_auth_help_links() {
  $links = array();
  foreach (module_implements('auth') as $module) {
    $links[] = l(module_invoke($module, 'info', 'name'), 'user/help', array(), NULL, $module);
  }
  return $links;
}

Seems to me that the function sms_user_auth($number) needs to be renamed.

#1

diggersf - March 9, 2009 - 20:36
Status:active» fixed

Fixed & committed in 5.x and 6.x. Thanks for the detailed report!

#2

System Message - March 23, 2009 - 20:40
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.