Support > cpg1.5 email
Emails being sent to old admin
Αndré:
--- Quote from: maddogprod on August 17, 2016, 07:18:50 pm ---He gets "A new user with the username "xyz" has registered in your gallery."
--- End quote ---
This is how get the admin email addresses for such emails:
--- Code: (register.php) --- if (UDB_INTEGRATION == 'coppermine') {
// get default language in which to inform the admins
$result = cpg_db_query("SELECT user_id, user_email, user_language FROM {$CONFIG['TABLE_USERS']} WHERE user_group = 1");
while ( ($row = mysql_fetch_assoc($result)) ) {
if (!empty($row['user_email'])) {
$admins[$row['user_id']] = array('email' => $row['user_email'], 'lang' => $row['user_language']);
}
}
} else {
//@todo: is it possible to get the language from bridged installs?
$admins[] = array('email' => $CONFIG['gallery_admin_email'], 'lang' => 'english');
}
--- End code ---
As it seems your gallery is unbridged, that user must be in user_group "1", though Coppermine says something different. I'd like to have a closer look at this issue. I'd need access to the MySQL database of your Coppermine gallery. If you agree, I'll send you my contact information.
maddogprod:
I can do that if you want. I've attached a db screenshot. The user in question is highlighted in YELLOW. He's definitely user_group 2!
Αndré:
Weird. Is there maybe an email forwarder for some of the current admins, which redirects to the old admin email address?
Next step would be to debug the content of $admins. Please add
--- Code: ---print_r($admins);die();
--- End code ---
below the above mentioned code, register a new test user and have a look at the output after submitting the form.
maddogprod:
No forwarders. I checked and double checked since that was the obvious thing.
Should the new test user be a regular user or an admin? Tons of new users have been added since this person and they don't get the notices.
Αndré:
It doesn't matter, as we only want to see the content of the array of admins which has been prepared.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version