EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #08137
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] Sending email when item is made live
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>, Yuri Carrer <yuri.carrer@unipd.it>
- Subject: Re: [EP-tech] Sending email when item is made live
- From: "Stenger, Avischai" <avischai.stenger@ulb.tu-darmstadt.de>
- Date: Wed, 22 Apr 2020 09:40:27 +0000
Hallo Yuri,
tnks for the Infos. I thing I found a different way, with less code-changing. I am still testing it. I modified a bit the :
CGI Script (and other non-screen functions)
From a CGI script, you can send a message to a user via the repository object, as such you need to specify the user, which need not be the current user:
my $repository = new EPrints::Session; my $db = $repository->database; my $current_user = $repository->current_user(); $db->save_user_message( $current_user->get_value( "userid" ), #Userid to receive the message "message", #Message type $repo->html_phrase("some_phrase_identifier", ( #the message body, in this instance a phrase identifier "name" => $current_user->render_value( "name" ) # pin name/value pairs as required for the phrase; ) ) ); And it looks like it will work fine.
Regards
A.
|
- Follow-Ups:
- Re: [EP-tech] Sending email when item is made live
- From: "Stenger, Avischai" <avischai.stenger@ulb.tu-darmstadt.de>
- Re: [EP-tech] Sending email when item is made live
- References:
- [EP-tech] Sending email when item is made live
- From: "Stenger, Avischai" <avischai.stenger@ulb.tu-darmstadt.de>
- Re: [EP-tech] Sending email when item is made live
- From: Yuri Carrer <yuri.carrer@unipd.it>
- Re: [EP-tech] Sending email when item is made live
- From: "Stenger, Avischai" <avischai.stenger@ulb.tu-darmstadt.de>
- [EP-tech] Sending email when item is made live
- Prev by Date: Re: [EP-tech] Sending email when item is made live
- Next by Date: Re: [EP-tech] Sending email when item is made live
- Previous by thread: [EP-tech] EPrints/CRIS
- Next by thread: [EP-tech] DOI handling in orcid_support_advance
- Index(es):