forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 email => Topic started by: maddogprod on September 24, 2012, 08:36:12 pm

Title: Send notifications to only specific admins
Post by: maddogprod on September 24, 2012, 08:36:12 pm
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!
Title: Re: Send notifications to only specific admins
Post by: Jeff Bailey on September 24, 2012, 11:53:04 pm
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:
Code: [Select]
$result = cpg_db_query("SELECT user_id, user_email, user_language FROM {$CONFIG['TABLE_USERS']} WHERE user_group = 1");
replace with:
Code: [Select]
$result = cpg_db_query("SELECT user_id, user_email, user_language FROM {$CONFIG['TABLE_USERS']} WHERE user_name = 'username_of_the_admin'");
Title: Re: Send notifications to only specific admins
Post by: maddogprod on September 25, 2012, 12:03:15 am
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/
Title: Re: Send notifications to only specific admins
Post by: Jeff Bailey on September 25, 2012, 12:06:05 am
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
Title: Re: Send notifications to only specific admins
Post by: maddogprod on September 25, 2012, 02:55:20 am
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!
Title: Re: Send notifications to only specific admins
Post by: Jeff Bailey on September 25, 2012, 02:59:23 am
Please start a new thread for your additional questions.
http://forum.coppermine-gallery.net/index.php/topic,55415.msg270618.html#msg270618
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.
Title: Re: Send notifications to only specific admins
Post by: maddogprod on September 25, 2012, 03:25:14 am
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.
Title: Re: Send notifications to only specific admins
Post by: Jeff Bailey on September 25, 2012, 03:42:19 am
The answer to your question
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
And could I add a second user name to that code?
try this
Code: [Select]
$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'");
Title: Re: Send notifications to only specific admins
Post by: maddogprod on September 25, 2012, 03:56:31 am
Thanks
Title: Re: Send notifications to only specific admins
Post by: Αndré on September 27, 2012, 12:54:42 pm
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:
Code: [Select]
$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.