Make WordPress Core


Ignore:
Timestamp:
11/20/2006 04:29:06 AM (20 years ago)
Author:
ryan
Message:

ID instead of id. Props Nazgul. fixes #3152

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/capabilities.php

    r4495 r4504  
    131131class WP_User {
    132132        var $data;
    133         var $id = 0;
     133        var $ID = 0;
     134        var $id = 0; // Deprecated, use $ID instead.
    134135        var $caps = array();
    135136        var $cap_key;
     
    194195        function add_role($role) {
    195196                $this->caps[$role] = true;
    196                 update_usermeta($this->id, $this->cap_key, $this->caps);
     197                update_usermeta($this->ID, $this->cap_key, $this->caps);
    197198                $this->get_role_caps();
    198199                $this->update_user_level_from_caps();
     
    203204                        return;
    204205                unset($this->caps[$role]);
    205                 update_usermeta($this->id, $this->cap_key, $this->caps);
     206                update_usermeta($this->ID, $this->cap_key, $this->caps);
    206207                $this->get_role_caps();
    207208        }
     
    216217                        $this->roles = false;
    217218                }
    218                 update_usermeta($this->id, $this->cap_key, $this->caps);
     219                update_usermeta($this->ID, $this->cap_key, $this->caps);
    219220                $this->get_role_caps();
    220221                $this->update_user_level_from_caps();
     
    262263
    263264                $args = array_slice(func_get_args(), 1);
    264                 $args = array_merge(array($cap, $this->id), $args);
     265                $args = array_merge(array($cap, $this->ID), $args);
    265266                $caps = call_user_func_array('map_meta_cap', $args);
    266267                // Must have ALL requested caps
Note: See TracChangeset for help on using the changeset viewer.