Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

Send email to all users with admin level

+2 votes
132 views
asked Mar 8, 2017 in Q2A Core by Lukas
Hello I would like to know if there is a way to obtain all email addresses of users who has admin level. We will have multiple admins at our website and I would like to sent email notification to all of them if the user is created.

Thanks for any help.
Q2A version: 1.7.4

1 Answer

+3 votes
answered Mar 8, 2017 by pupi1985
selected Mar 8, 2017 by Lukas
 
Best answer

Just connect to the database and run this SQL query:

SELECT email, `level` FROM qa_users WHERE `level` >= 100

You can use this as a reference:

QA_USER_LEVEL_BASIC = 0
QA_USER_LEVEL_APPROVED = 10
QA_USER_LEVEL_EXPERT = 20
QA_USER_LEVEL_EDITOR = 50
QA_USER_LEVEL_MODERATOR = 80
QA_USER_LEVEL_ADMIN = 100
QA_USER_LEVEL_SUPER = 120

commented Mar 8, 2017 by Lukas
thanks, nice solution :)
...