Forum Discussion

FranzG's avatar
FranzG
Genius
6 years ago

Get Moderator preferences via API?

Anybody know if it's possible to get these settings (preferences) for a user via the Community APIs or maybe user context?

 

I looked through the settings that come from the settings apis as well as profiles api but didn't see anything that looks like it would be related to these.

We're hoping to get the state of these checkboxes to help us add custom logging to determine specifically which moderator user removed the unread by moderator status on a post.

Thanks!

  • FranzG  yes, you can get those, but it's (as usual) a bit difficult because the setting keys are not obvious... try these queries (you can use '*' to get more fields, but I found the user.derived the most useful/clear):

    "SELECT user.derived FROM settings WHERE id = 'layout.mark_messages_read_by_moderator' AND user.id = '<user.id>'"
    
    "SELECT user.derived FROM settings WHERE id = 'layout.show_mod_flag_column' AND user.id = '<user.id>'"

      

  • FranzG  yes, you can get those, but it's (as usual) a bit difficult because the setting keys are not obvious... try these queries (you can use '*' to get more fields, but I found the user.derived the most useful/clear):

    "SELECT user.derived FROM settings WHERE id = 'layout.mark_messages_read_by_moderator' AND user.id = '<user.id>'"
    
    "SELECT user.derived FROM settings WHERE id = 'layout.show_mod_flag_column' AND user.id = '<user.id>'"