a0164c6c by Marty Penner

Deprecate User#__get(). It causes too many cache-related headaches

1 parent 6ead7a0c
......@@ -14,6 +14,14 @@ class User {
$this->id = $this->ID = $this->_wpuser->id;
}
/**
* @deprecated This method has caused MANY headaches with it's caching implementation.
* It bypasses the metacache (which gets updated when any meta field is set
* or retrieved), so causes the data used elsewhwere to be stale. BAD STUFF.
* @param $key
*
* @return mixed
*/
public function __get($key) {
if (isset($this->_wpuser->{$key})) {
return $this->_wpuser->{$key};
......