fleshins
Member
Posted 14 years ago #
Given a user's id, $user_id, the only way I see to get user_email is through get_userdata($user_id)->user_email
Only thing I don't like about that approach is that get_userdata() returns a rather large object containing everything you could possibly want to know about the user. Since I'm only interested in the user's email address is there a more efficient way to get it?
Its still going to have to query the database which is the expensive part, so the overhead of returning the full structure, instead of just the email address, is simply a matter of bytes which is the scope of things is minimal (a full user data row is about 710 bytes)
You could of course simply query the DB directly.
fleshins
Member
Posted 14 years ago #
Thanks Steve - that's what I figured. Thanks for all of the replies!