[wp-hackers] get_users() magic methods revisited
nikolov.tmw at gmail.com
Mon Feb 24 18:13:11 UTC 2014
Which version of WP are they using? I think that before the introduction of
the WP_User object, objects returned from get_users() were just normal
StdClass objects which therefore don't have magic methods and would return
null(I believe) when you try to access an unset property(and raise a
warning depending on the error levels) which in turn when converted to
string becomes an empty string.
On Mon, Feb 24, 2014 at 7:06 PM, Mike Walsh <mpwalsh8 at gmail.com> wrote:
> A while ago I posted a question which resulted in a suggestion to rely on
> the "magic methods" of get_users() to reference the first name and last
> name fields stored as user meta data.
> I am revisiting this because I've had a report from one user of a plugin
> which makes uses of this that their first name and last name fields are
> always empty. Does anyone know of a reason why in some instances this data
> wouldn't be populated?
> Mike Walsh - mpwalsh8 at gmail.com
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers