drupal_auth

Versions
4.6 – 4.7
drupal_auth($username, $password, $server)
5
drupal_auth($username, $password, $server = FALSE)

Implementation of hook_auth().

Code

modules/drupal.module, line 312

<?php
function drupal_auth($username, $password, $server) {
  if (variable_get('drupal_authentication_service', 0)) {
    $result = xmlrpc("http://$server/xmlrpc.php", 'drupal.login', $username, $password);
    if ($result === FALSE) {
      drupal_set_message(t('Error %code : %message', array('%code' => theme('placeholder', xmlrpc_errno()), '%message' =>  theme('placeholder', xmlrpc_error_msg()))), 'error');
    }
    else {
      return $result;
    }
  }
}
?>
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.