| 5 drupal.module | drupal_login($username, $password) |
Callback function from drupal_xmlrpc() for authenticating remote clients.
Remote clients are usually other Drupal instances.
File
- modules/
drupal/ drupal.module, line 376 - Lets users log in using a Drupal ID and can notify a central server about your site.
Code
<?php
function drupal_login($username, $password) {
if (variable_get('drupal_authentication_service', 0)) {
if ($user = user_load(array('name' => $username, 'pass' => $password, 'status' => 1))) {
return $user->uid;
}
else {
return 0;
}
}
}
?>Login or register to post comments