Commit e28e5bf8 authored by nohup's avatar nohup

Issue #135533 by akosipax: Added check for current user

parent 53ccea3c
......@@ -88,6 +88,14 @@ class me_plugin_argument_validate_me_alias extends views_plugin_argument_validat
// and check to be sure.
foreach ($uid_args as $key => $uid_arg) {
$uid_args[$key] = _me_check_arg($uid_arg, $this->argument->options['me_validate_user_argument_type'] == 'name', FALSE);
//Make sure we only allow access to the current user
if (is_numeric($uid_args[$key])) {
if ($uid_args[$key] != $GLOBALS['user']->uid) {
return FALSE;
}
} else if ($uid_args[$key] != $GLOBALS['user']->name) {
return FALSE;
}
}
$argument = implode($seperator, $uid_args);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment