user_validate_authmap

Versions
4.6
user_validate_authmap($account, $authname, $module)

Code

modules/user.module, line 272

<?php
function user_validate_authmap($account, $authname, $module) {
  $result = db_query("SELECT COUNT(*) from {authmap} WHERE uid != %d AND authname = '%s'", $account->uid, $authname);
  if (db_result($result) > 0) {
    $name = module_invoke($module, 'info', 'name');
    return t('The %u ID %s is already taken.', array('%u' => $name, '%s' => theme('placeholder', $authname)));
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.