current user cleanup

git-svn-id: http://svn.automattic.com/wordpress/trunk@3566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan
2006-02-22 19:08:55 +00:00
parent e06ed8c9b6
commit 5322fc2faa
15 changed files with 73 additions and 67 deletions

View File

@@ -395,7 +395,7 @@ function map_meta_cap($cap, $user_id) {
// Capability checking wrapper around the global $current_user object.
function current_user_can($capability) {
global $current_user;
$current_user = wp_get_current_user();
$args = array_slice(func_get_args(), 1);
$args = array_merge(array($capability), $args);