Index: openacs-4/packages/notifications/www/request-notification.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/www/request-notification.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/notifications/www/request-notification.tcl 8 Mar 2018 08:20:16 -0000 1.4 +++ openacs-4/packages/notifications/www/request-notification.tcl 30 May 2018 14:55:47 -0000 1.5 @@ -64,24 +64,28 @@ -value [lindex $delivery_methods 0 1] -set username "" if {[template::form is_valid notify]} { template::form get_values notify party_id interval_id type_id delivery_method_id db_foreach get_user {} { - if {[notification::request::get_request_id -user_id $user_id -type_id $type_id -object_id $object_id] eq ""} { - notification::request::new -type_id $type_id -user_id $user_id -object_id $object_id -interval_id $interval_id \ + if {[notification::request::get_request_id \ + -user_id $user_id \ + -type_id $type_id \ + -object_id $object_id] eq ""} { + notification::request::new \ + -type_id $type_id \ + -user_id $user_id \ + -object_id $object_id \ + -interval_id $interval_id \ -delivery_method_id $delivery_method_id - } + } } #if party_id is a group of users then returnredirect, else we get an error - db_0or1row get_user_name {} - if {$username eq ""} { + if {![db_0or1row user_p {}]} { ad_returnredirect $return_url - } + } - # Add the subscribe notification::request::new \ -type_id $type_id \