drupal_login

Versions
4.6 – 5
drupal_login($username, $password)

Callback function from drupal_xmlrpc() for authenticating remote clients.

Remote clients are usually other Drupal instances.

Code

modules/drupal.module, line 202

<?php
function drupal_login($username, $password) {
  if ($user = user_load(array('name' => $username, 'pass' => $password, 'status' => 1))) {
    return $user->uid;
  }
  else {
    return 0;
  }
}
?>
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.