Send notifications to only specific admins Send notifications to only specific admins
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Send notifications to only specific admins

Started by maddogprod, September 24, 2012, 08:36:12 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

maddogprod

My set-up has three admins. When there's a new registration or photo submission, everyone gets the email. I'd only like it to go to one person. I don't see a way to do this. Is there a way to regulate which admin(s) get the emails?

Thanks!

Jeff Bailey

Please post links.
http://forum.coppermine-gallery.net/index.php/topic,55415.msg270616.html#msg270616

It would probably be possible if you create a separate group and grant that group admin access in your mysql table.

Or try
In register.php
find:

$result = cpg_db_query("SELECT user_id, user_email, user_language FROM {$CONFIG['TABLE_USERS']} WHERE user_group = 1");

replace with:

$result = cpg_db_query("SELECT user_id, user_email, user_language FROM {$CONFIG['TABLE_USERS']} WHERE user_name = 'username_of_the_admin'");
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

maddogprod

Thanks. Version two, while hard coded, feels better. Though I guess both are "hard coded" of a sort anyway.

In the second, where would I find the similar code to approve photos that are uploaded? And could I add a second user name to that code?

Since you asked....the gallery is at: http://belvederecommunityfoundation.com/photocontest/

Jeff Bailey

#3
Please start a new thread for additional questions.
http://forum.coppermine-gallery.net/index.php/topic,55415.msg270618.html#msg270618

<!--Coppermine Photo Gallery 1.5.14 (stable)-->
Please upgrade.
http://forum.coppermine-gallery.net/index.php/topic,74682.0.html

Please resolve this thread.
http://forum.coppermine-gallery.net/index.php/topic,55415.msg270631.html#msg270631

Thank you for posting your link. Please remember to read the board rules.
http://forum.coppermine-gallery.net/index.php/topic,55415.0.html
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

maddogprod

It's updated to the latest, stable version. Now do I get a jellybean and the answer to my very related follow-up questions?

THANKS!

Jeff Bailey

Please start a new thread for your additional questions.
http://forum.coppermine-gallery.net/index.php/topic,55415.msg270618.html#msg270618
Quote from: Joachim Müller on September 28, 2008, 10:28:42 AM
10. One question per thread
We have a strict "One question/issue per thread rule", which helps both supporters/moderators to keep track of open/closed issues as well as users who search the board or browse it, looking for answers to their question. Don't try to "hijack" other's threads by posting unrelated questions to an existing thread.
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

maddogprod

Got it. Though this is the same issue. It's asking for clarification and additional information about your recommendation so I and maybe others can see it all in one thread.

Jeff Bailey

The answer to your question
Quote from: maddogprod on September 25, 2012, 12:03:15 AM
In the second, where would I find the similar code to approve photos that are uploaded?
Involes a different process and several options to change the way it works. Please create another thread. If you want you can come back to this thread and post a link to it as a reference.

As for
Quote from: maddogprod on September 25, 2012, 12:03:15 AM
And could I add a second user name to that code?
try this

$result = cpg_db_query("SELECT user_id, user_email, user_language FROM {$CONFIG['TABLE_USERS']} WHERE user_name = 'username_of_the_admin' OR user_name = 'second_admin'");
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford


Αndré

Second thread: http://forum.coppermine-gallery.net/index.php/topic,75465.0.html

Instead of selecting the admins by user_name, I'd perform this by user_id. To select several admins you could change the query to something like this:
$result = cpg_db_query("SELECT user_id, user_email, user_language FROM {$CONFIG['TABLE_USERS']} WHERE user_id IN ('1', '3', '7')");


I just marked this thread as solved. Next time, please do that yourself. Thanks.