Title: Get user meta data
Last modified: October 30, 2017

---

# Get user meta data

 *  [anderslorentzon](https://wordpress.org/support/users/anderslorentzon/)
 * (@anderslorentzon)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/get-user-meta-data/)
 * Is it possible to publish mqtt to broker whenever a user changes a specific meta-
   data field and then pass that value of that field into the message? Is it also
   possible to pass the userID or similar into the mqtt “topic”?
 * (I need this for a IoT application and calling WP REST API seams much more complicated
   and not at all as light-weight.)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Roy Tanck](https://wordpress.org/support/users/roytanck/)
 * (@roytanck)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/get-user-meta-data/#post-9869162)
 * Oops, I missed this question. Sorry.
 * Updating a user meta field should trigger the ‘updated_usermeta’ hook, so you
   can use this to send an MQTT message.
 * [http://hookr.io/4.7.4/actions/updated_usermeta/](http://hookr.io/4.7.4/actions/updated_usermeta/)
 * The user’s ID is one of the hooks parameters, so you should be able to send that
   along using the %ARG1% placeholder.
 * This fires for each user meta field, so you might need to also pass the meta_key(%
   ARG2%), and apply some filtering in your client.

Viewing 1 replies (of 1 total)

The topic ‘Get user meta data’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-mqtt_349bce.svg)
 * [WP-MQTT](https://wordpress.org/plugins/wp-mqtt/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-mqtt/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-mqtt/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-mqtt/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-mqtt/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-mqtt/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Roy Tanck](https://wordpress.org/support/users/roytanck/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/get-user-meta-data/#post-9869162)
 * Status: not resolved