meeting-room-booking-system / mrbs-code

MRBS application code
Other
124 stars 61 forks source link

admin_email@your.org being included as recipient. Can't see why. #2235

Open jberanek opened 6 years ago

jberanek commented 6 years ago

Hi, I have a 1.6.1 installtion which has one particular room set to require approval. Bookings made for this room are sending an email with recipients admin_email@your.org, the room administrators and the booker. I've commented out the default recipient setting in congig.inc.php

//$mail_settings['recipients'] = 'admin_email@your.org.';

but admin_email@your.org is still included as a recipient. I've checked it doesn't appear in the area or room admin email addresses. Here are the settings from the WHO TO EMAIL section of config.inc.php

$mail_settings['admin_on_bookings']      = FALSE;  // the addresses defined by $mail_settings['recipients'] below
$mail_settings['area_admin_on_bookings'] = FALSE;  // the area administrator
$mail_settings['room_admin_on_bookings'] = TRUE;  // the room administrator
$mail_settings['booker']                 = TRUE;  // the person making the booking
$mail_settings['book_admin_on_approval'] = FALSE;  // the booking administrator when booking approval is enabled
                                                   // (which is the MRBS admin, but this setting allows MRBS
                                                   // to be extended to have separate booking approvers)     

Can you help me find where this is coming from please? Thanks

Reported by: ahar23

Original Ticket: mrbs/support-requests/1526

jberanek commented 6 years ago

It's probably coming from systemdefaults.inc.php. The config file overrides systemdefaults, so just commenting it out will mean it's still there. If you want to get rid of it you'd need to unset() it. However this will probably cause errors and still not do what you need.

You should note that the term "room administrator" is a little confusing. They are just people who get notified when a booking is made for that room. They don't have any admin powers [we should probably fix this in a future release]. If you want to define specific admins for specific rooms you'll need to modify MRBS in a couple of places: get_approvers_email() in functions_mail.inc and auth_book_admin() in mrbs_auth.inc.

Original comment by: campbell-m

jberanek commented 6 years ago

Hi, Thanks for that. I've uncommented the line in config.inc.php so that I can at least set it to an address under our control. I'm still not sure why it's included as a recipient at all if only room admin and booker are set to true for who to email? Having the room set to require approval seems to be causing this different and unexpected behaviour. Being able to specify room admins by username and granting them the associated powers this way would indeed be a useful development.

Original comment by: ahar23