Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Tenzing
/
Tz Tools
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
a0164c6c
authored
2014-07-29 12:13:42 -0400
by
Marty Penner
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Deprecate User#__get(). It causes too many cache-related headaches
1 parent
6ead7a0c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
lib/User.php
lib/User.php
View file @
a0164c6
...
...
@@ -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
};
...
...
Please
register
or
sign in
to post a comment