Index: notices.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/notices/notices.module,v
retrieving revision 1.7
diff -u -r1.7 notices.module
--- notices.module	21 Jul 2008 00:20:23 -0000	1.7
+++ notices.module	2 Oct 2008 17:38:05 -0000
@@ -308,15 +308,15 @@
 */
 function notices_mail_alter($mailkey, $to, $subject, $body, $from, $headers) {
   // load the user that is getting this email
-  $user = user_load(array(mail=>$to));
-  
+  $user = user_load(array('mail'=>$to));
+
   // if this email address does not match with a user in our system; do nothing
-  if (!user_access('receive notices', $user) || !$user->uid) return; 
-  
+  if (!$user->uid || !user_access('receive notices', $user)) return;
+
   $subject = htmlentities($subject);
   $from = htmlentities($from);
   $message = stristr($body, "<HTML>") ? $body : htmlentities($body);
-  
+
   db_query("INSERT INTO {notices} (uid, subject, sender, message, created) VALUES (%d, '%s', '%s', '%s', %d)", $user->uid, $subject, $from, $message, time());
 }
 
