EPrints Technical Mailing List Archive
Message: #06160
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] Error in Script - Adding usertype validation in
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
- Subject: Re: [EP-tech] Error in Script - Adding usertype validation in
- From: Eliseo Gatchalian <Eliseo.Gatchalian@wintec.ac.nz>
- Date: Thu, 12 Jan 2017 21:01:41 +0000
Thanks David... I tried to do: <if test="is_set($current_user) and $current_user{usertype} = 'editor'"> <if test="ROCW"> <print expr="ROCW"/>. </if> </if> ... and tried to restart apache but still coming out with an error when not logged in. :( I may have to dig further... Thanks! Best regards, Ellis ---------------------------------------------------------------------- Message: 1 Date: Wed, 11 Jan 2017 22:18:59 +0000 From: Eliseo Gatchalian <Eliseo.Gatchalian@wintec.ac.nz> Subject: [EP-tech] Error in Script - Adding usertype validation in citation To: "'eprints-tech@ecs.soton.ac.uk'" <eprints-tech@ecs.soton.ac.uk> Message-ID: <ME1PR01MB1841B945C780A96A039BAE2CCB660@ME1PR01MB1841.ausprd01.prod.outlook.com> Content-Type: text/plain; charset="us-ascii" Hi, I might be missing something and wondering if anyone has encountered of might have a fix on this? We've added this script in cfg/citations/eprint/default.xml <if test="$current_user{usertype} = 'editor'"> <if test="ROCW"> <print expr="ROCW"/>. </if> </if> When a user is logged in, there is no [Error in Script] when viewing citation results. But when not logged in, I'm getting the error in script. I think it might be with $current_user{usertype} variable not declared/not used when not logged in, thus the error? Ellis Gatchalian Systems Librarian Wintec Private Bag 3036, Waikato Mail Centre, Hamilton 3240 Phone: +64-(0)7-834 8800 ext 8633 Fax: +64-(0)7-838 8257 Email: ellis.gatchalian@wintec.ac.nz Web: http://www.wintec.ac.nz/ [Description: WIN01] ________________________________ This electronic mail transmission is intended for the named recipients only. It may contain private and confidential information. If this has come to you in error you must take no action based upon it, nor must you copy it or show it to anyone; please telephone or email the sender at Wintec immediately and return the original email. We cannot accept any liability for any loss or damage sustained as a result of software viruses. It is your responsibility to carry out such virus checking as is necessary before opening any attachment which may be included with this message. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20170111/aefef07e/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 5148 bytes Desc: image001.gif Url : http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20170111/aefef07e/attachment-0001.gif ------------------------------ Message: 2 Date: Wed, 11 Jan 2017 22:27:00 +0000 From: David R Newman <drn@ecs.soton.ac.uk> Subject: Re: [EP-tech] Error in Script - Adding usertype validation in citation To: eprints-tech@ecs.soton.ac.uk Message-ID: <8803303f-a6f6-b9f6-3261-9c0e561c1748@ecs.soton.ac.uk> Content-Type: text/plain; charset="windows-1252" Hi Ellis, What you say sounds about right. I am not 100% sure the following will work but something like it should: <if test="is_set($current_user) and $current_user{usertype} = 'editor'"> <if test="ROCW"> <print expr="ROCW"/>. </if> </if> Regards David Newman On 11/01/2017 22:18, Eliseo Gatchalian wrote: > > Hi, > > I might be missing something and wondering if anyone has encountered > of might have a fix on this? We?ve added this script in > cfg/citations/eprint/default.xml > > <if test="$current_user{usertype} = 'editor'"> > > <if test="ROCW"> > > <print expr="ROCW"/>. > > </if> > > </if> > > When a user is logged in, there is no [Error in Script] when viewing > citation results. But when not logged in, I?m getting the error in > script. > > I think it might be with $current_user{usertype} variable not > declared/not used when not logged in, thus the error? > > > *Ellis Gatchalian* > Systems Librarian > Wintec > Private Bag 3036, Waikato Mail Centre, Hamilton 3240 > Phone: +64-(0)7-834 8800 ext 8633 > Fax: +64-(0)7-838 8257 > > Email: ellis.gatchalian@wintec.ac.nz > > Web: http://www.wintec.ac.nz/ > > > > Description: WIN01 > > > > ---------------------------------------------------------------------- > -- > > This electronic mail transmission is intended for the named recipients > only. It may contain private and confidential information. If this has > come to you in error you must take no action based upon it, nor must > you copy it or show it to anyone; please telephone or email the sender > at Wintec immediately and return the original email. We cannot accept > any liability for any loss or damage sustained as a result of software > viruses. It is your responsibility to carry out such virus checking as > is necessary before opening any attachment which may be included with > this message. > > > > *** Options: > http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech > *** Archive: http://www.eprints.org/tech.php/ > *** EPrints community wiki: http://wiki.eprints.org/ > *** EPrints developers Forum: http://forum.eprints.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20170111/7fce13fd/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 27 bytes Desc: not available Url : http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20170111/7fce13fd/attachment.gif ------------------------------ _______________________________________________ Eprints-tech mailing list Eprints-tech@ecs.soton.ac.uk http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech End of Eprints-tech Digest, Vol 100, Issue 6 ********************************************
- Prev by Date: Re: [EP-tech] Error in Script - Adding usertype validation in citation
- Next by Date: Re: [EP-tech] Error in Script - Adding usertype validation in
- Previous by thread: [EP-tech] Error in Script - Adding usertype validation in citation
- Next by thread: Re: [EP-tech] Error in Script - Adding usertype validation in
- Index(es):