• Hello guys,

    I’m having difficulty retrieving author email address without calling “get_the_author_meta()”.

    Indeed, in my situation, I must restrict the wp_users table so only the ID and user_email columns can be accessed. So if I call “get_the_author_meta()” it fails because it needs full access to the table.

    Is there a way to achieve that differently?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Anonymous User 9055193

    (@anonymized-9055193)

    What have you tried so far? Please paste your code.

    This may also help for reference:
    http://dev.mysql.com/doc/refman/5.1/en/grant.html#grant-column-privileges

    Thread Starter sofianemad

    (@sofianemad)

    Hello tada,

    Thanks for your answer.

    That’s exactly what I have done: granting column privileges to ID and user_email only. This part works fine.

    My understanding is that get_the_author_meta(‘user_email’) would still request access to all columns and for this reason calling it fails. I need an alternative to that so I can just access user_email without a need to grant access to all columns.

    As for the code it is just a call to get_the_author_meta(‘user_email’). I haven’t tried anything else because honestly I don’t know from where to start right now.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Get author email address directly’ is closed to new replies.