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 167

<?php
function drupal_auth($username, $password, $server) {
  $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.