Ejemplo n.º 1
0
 public static function sendWarningNoticeToUser(Warning $warning)
 {
     $user = UserDao::getUserByID($warning->userId);
     if ($warning->type == RES_WARNING_NOTE) {
         $body = "You have been issued a Notification, you can view it at: " . Config::location . "index.php?pageid=viewWarning&warnid=" . $warning->id;
         EmailUtil::sendEmail($user->email, "New Notification", $body);
     } else {
         $body = "You have been issued an " . $warning->getTypeString() . " Warning, you can view it at: " . Config::location . "index.php?pageid=viewWarning&warnid=" . $warning->id;
         EmailUtil::sendEmail($user->email, "New " . $warning->getTypeString() . " Warning Notice", $body);
     }
 }