function services_auth_invoke in Services 7
Same name and namespace in other branches
- 6.3 services.runtime.inc \services_auth_invoke()
- 6.2 services.module \services_auth_invoke()
- 7.3 includes/services.runtime.inc \services_auth_invoke()
8 calls to services_auth_invoke()
File
- ./
services.module, line 236 - @author Services Dev Team
Code
function services_auth_invoke($method, &$arg1 = NULL, &$arg2 = NULL, &$arg3 = NULL) {
$module = variable_get('services_auth_module', '');
// Get information about the current auth module
$func = services_auth_info($method, $module);
if ($func) {
if ($file = services_auth_info('#file')) {
require_once drupal_get_path('module', $module) . '/' . $file;
}
if (is_callable($func)) {
$args = func_get_args();
// Replace method name and arg1 with reference to $arg1 and $arg2.
array_splice($args, 0, 3, array(
&$arg1,
&$arg2,
&$arg3,
));
return call_user_func_array($func, $args);
}
}
else {
return TRUE;
}
}