diff options
author | Dries Buytaert <dries@buytaert.net> | 2002-11-09 21:46:54 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2002-11-09 21:46:54 +0000 |
commit | 51f4b91e5123e3e50e139821a0ce1e0f0ea5b31d (patch) | |
tree | c0d5ac83c5ee3b7a4868dc3965731c4a3bd06cf2 /modules/user/user.module | |
parent | 6ba38a7eebf0182072a2c1b9c40dedcaf1405db6 (diff) | |
download | brdo-51f4b91e5123e3e50e139821a0ce1e0f0ea5b31d.tar.gz brdo-51f4b91e5123e3e50e139821a0ce1e0f0ea5b31d.tar.bz2 |
* User patch by Natrak:
- Moved the Drupal login XML-RPC API to drupal.module.
- DA logins are now assigned the proper role.
Diffstat (limited to 'modules/user/user.module')
-rw-r--r-- | modules/user/user.module | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/modules/user/user.module b/modules/user/user.module index d51974d34..a3df52c55 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -399,26 +399,6 @@ function user_link($type) { return $links ? $links : array(); } -function drupal_login($arguments) { - // an XML-RPC method called by external clients (usually other Drupal instances) - $argument = $arguments->getparam(0); - $username = $argument->scalarval(); - $argument = $arguments->getparam(1); - $password = $argument->scalarval(); - - if ($user = user_load(array(name => "$username", "pass" => $password, "status" => 1))) { - return new xmlrpcresp(new xmlrpcval($user->uid, "int")); - } - else { - return new xmlrpcresp(new xmlrpcval(0, "int")); - } -} - - -function user_xmlrpc() { - return array("drupal.login" => array("function" => "drupal_login")); -} - /*** Authentication methods ************************************************/ function user_get_authname($account, $module) { @@ -542,7 +522,7 @@ function user_login($edit = array(), $msg = "") { if (module_invoke($module, "auth", $name, $pass, $server)) { if (variable_get("user_register", 1) == 1 && !user_load(array("name" => "$name@$server"))) { //register this new user watchdog("user", "new user: $name@$server ($module ID)"); - $user = user_save("", array("name" => "$name@$server", "pass" => user_password(), "init" => "$name@$server", "status" => 1, "authname_$module" => "$name@$server")); + $user = user_save("", array("name" => "$name@$server", "pass" => user_password(), "init" => "$name@$server", "status" => 1, "authname_$module" => "$name@$server", "rid" => _user_authenticated_id())); break; } } |