EPrints Technical Mailing List Archive
Message: #06765
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] Usertype at demoeprints
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
- Subject: Re: [EP-tech] Usertype at demoeprints
- From: John Salter <J.Salter@leeds.ac.uk>
- Date: Mon, 14 Aug 2017 08:53:36 +0000
Hi Agung, I *think* the code that's reverting the usertype to 'user' is in [EPRINTS_ROOT]/perl_lib/EPrints/Plugin/Screen/NewUser.pm In the 'action_create' sub, the config 'default_user_type' is referenced, and the user is created with this. This config is normally in [EPRINTS_ROOT]/archives/[ARCHIVEID]/cfg/cfg.d/registration.pl I think there are two options: i) override the NewUser plugin (see: https://wiki.eprints.org/w/Instructions_for_local_plugins) - you just need to override the 'action_create'. ii) Make the 'default_user_type' find the data in the request, and return the value selected. With either option, you should make sue the usertype chosen isn't going to cause you problems - e.g allowing someone to create an admin
account could allow them to break things! If you want to limit the usertype options in the workflow, you can add an 'options' parameter e.g.: <component><field ref="usertype" options="user,editor"/></component> but you should also validate that one of those options has been chosen when processing the registration. Cheers, John From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk]
On Behalf Of Ajunk Pracetio Hi, regards, Agung
Life isn't valuable if you don't have someone to care |
- References:
- [EP-tech] Usertype at demoeprints
- From: Ajunk Pracetio <prazetyo@gmail.com>
- [EP-tech] Usertype at demoeprints
- Prev by Date: [EP-tech] Usertype at demoeprints
- Next by Date: Re: [EP-tech] Licence information in Bazaar / plugin files
- Previous by thread: [EP-tech] Usertype at demoeprints
- Next by thread: Re: [EP-tech] Usertype at demoeprints
- Index(es):