function og_xmlrpc_subscribe_user in Organic groups 6
Same name and namespace in other branches
- 5.8 og_xmlrpc.inc \og_xmlrpc_subscribe_user()
- 5 og_xmlrpc.inc \og_xmlrpc_subscribe_user()
- 5.2 og_xmlrpc.inc \og_xmlrpc_subscribe_user()
- 5.3 og_xmlrpc.inc \og_xmlrpc_subscribe_user()
- 5.7 og_xmlrpc.inc \og_xmlrpc_subscribe_user()
- 6.2 includes/og.xmlrpc.inc \og_xmlrpc_subscribe_user()
1 string reference to 'og_xmlrpc_subscribe_user'
- og_xmlrpc in ./
og.module - Implementation of hook_xmlrpc(). /*
File
- includes/
og.xmlrpc.inc, line 4
Code
function og_xmlrpc_subscribe_user($username, $password, $gid, $uid) {
$admin = user_authenticate($username, $password);
if ($admin->uid) {
$account = user_load(array(
'uid' => $uid,
));
if ($account->uid) {
$return = og_subscribe_user($gid, $account);
return $return;
}
else {
return og_xmlrpc_error(t('Unrecognized user ID: %uid.', array(
'%uid' => $uid,
)));
}
}
else {
return og_xmlrpc_error(t('Wrong username or password.'));
}
}