Commit eb8c9b87 authored by Frank Bergmann's avatar Frank Bergmann

- altert-procs updated after bugfix in projop because

  of error to handle email from ananymous user (crm-tracking)
parent a1434d06
Pipeline #1067 failed with stages
......@@ -24,7 +24,6 @@ ad_library {
# -------------------------------------------------------------------
# Add an alert to the database alert queue
# -------------------------------------------------------------------
ad_proc im_send_alert {target_id frequency subject {message ""} } {
Add a new alert to the queue for a specific user.
The idea is to aggregate several alerts into a single email,
......@@ -53,17 +52,16 @@ ad_proc im_send_alert {target_id frequency subject {message ""} } {
}
# Determine the sender address
set sender_email_sql "select email as sender_email from parties where party_id = :current_user_id"
db_transaction {
db_1row sender_email $sender_email_sql
} on_error {
set sender_email [ad_parameter -package_id [ad_acs_kernel_id] SystemOwner "" "webmaster@localhost"]
}
if {"" == $sender_email} {
ad_return_complaint 1 "<li>Error getting the email of user $current_user_id"
return
set sender_email [ad_parameter -package_id [ad_acs_kernel_id] SystemOwner "" "webmaster@local\
host"]
if [catch {
set sender_email [db_string sender_email "select email as sender_email from parties where\
party_id = :current_user_id" -default "asfd@asdf.com"]
} errmsg] {
# nothing - use default
}
# Send out the mail
if [catch {
ns_sendmail $email $sender_email $subject $message
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment