When you are admin and set the option "Do you want to be notified when a user uses the Notify Post option? Normally these are just sent to Moderators." you get double notifies if you are also set as moderator for a certain forum.
Not unlikely to set yourself as moderator for visibibility reasons.
my fix?
change
Code:
$notify_array[] = $admin;;
into:
Code:
if (!in_array($admin,$notify_array)) { $notify_array[] = $admin; };
You can also save a bit of duplicate code in there for the e-mailing by checking for an empty array, and if so, add the main admin id to the array.
Thanks for the fix. Also made the change to remove the duplicate code.
I saw in the code if the main admin was not set, it would just take number 2, without a check if it was an admin or not. I would suggest a query that takes the first admin user from the userlist.
At our board user number 2 is an ex-admin who left.
I have a comment on that, why use user2? We have a superadmin field, why not use this?
If you look at the code, it takes the super admin field, but if that field is not set, it will take blindly user #2, without any check if it's an admin or not.