<div dir="auto">Hi,<div dir="auto"><br></div><div dir="auto">Thank you John..I will try it first</div><div dir="auto"><br></div><div dir="auto">Regards</div><div dir="auto">Agung</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Aug 14, 2017 15:56, &quot;John Salter&quot; &lt;<a href="mailto:J.Salter@leeds.ac.uk">J.Salter@leeds.ac.uk</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-GB" link="blue" vlink="purple">
<div class="m_5091029729681893751WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">Hi Agung,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">I *<b>think</b>* the code that&#39;s reverting the usertype to &#39;user&#39; is in [EPRINTS_ROOT]/perl_lib/<wbr>EPrints/Plugin/Screen/NewUser.<wbr>pm<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">In the &#39;action_create&#39; sub, the config &#39;default_user_type&#39; is referenced, and the user is created with this.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">This config is normally in [EPRINTS_ROOT]/archives/[<wbr>ARCHIVEID]/cfg/cfg.d/<a href="http://registration.pl" target="_blank">registrat<wbr>ion.pl</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">I think there are two options:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">i) override the NewUser plugin (see: <a href="https://wiki.eprints.org/w/Instructions_for_local_plugins" target="_blank">https://wiki.eprints.org/w/<wbr>Instructions_for_local_plugins</a><wbr>) - you just need to override the &#39;action_create&#39;.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">ii) Make the &#39;default_user_type&#39; find the data in the request, and return the value selected.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">With either option, you should make sue the usertype chosen isn&#39;t going to cause you problems - e.g allowing someone to create an admin
 account could allow them to break things!<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">If you want to limit the usertype options in the workflow, you can add an &#39;options&#39; parameter e.g.:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">&lt;component&gt;&lt;field ref=&quot;usertype&quot; options=&quot;user,editor&quot;/&gt;&lt;/<wbr>component&gt;<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">but you should also validate that one of those options has been chosen when processing the registration.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">Cheers,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">John<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"> <a href="mailto:eprints-tech-bounces@ecs.soton.ac.uk" target="_blank">eprints-tech-bounces@ecs.<wbr>soton.ac.uk</a> [mailto:<a href="mailto:eprints-tech-bounces@ecs.soton.ac.uk" target="_blank">eprints-tech-bounces@<wbr>ecs.soton.ac.uk</a>]
<b>On Behalf Of </b>Ajunk Pracetio<br>
<b>Sent:</b> 13 August 2017 11:41<br>
<b>To:</b> <a href="mailto:eprints-tech@ecs.soton.ac.uk" target="_blank">eprints-tech@ecs.soton.ac.uk</a><br>
<b>Subject:</b> [EP-tech] Usertype at demoeprints<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span class="m_5091029729681893751gmail-"><span lang="EN">Hi,</span></span><span lang="EN"><br>
<span class="m_5091029729681893751gmail-">I want to create a demoprint like <a href="http://demoprints.eprints.org/" target="_blank">
http://demoprints.eprints.org/</a><wbr>. I&#39;ve been able to bring up the usertype option at registration, but when I select &quot;editor&quot;, and try to login, the usertype is still the user, not the &quot;editor&quot; as I choose. It looks like my selection is not saved.</span><br>
<br>
<span class="m_5091029729681893751gmail-">Is there a wrong move? Please guidance.</span><br>
<br>
<span class="m_5091029729681893751gmail-">thank you</span></span><u></u><u></u></p>
</div>
<p class="MsoNormal"><span class="m_5091029729681893751gmail-"><span lang="EN">regards,</span></span><u></u><u></u></p>
</div>
<p class="MsoNormal"><span class="m_5091029729681893751gmail-"><span lang="EN">Agung</span></span><span lang="EN"><br clear="all">
</span><u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"><br>
-- <u></u><u></u></p>
<div>
<p class="MsoNormal">Life isn&#39;t valuable if you don&#39;t have someone to care<u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>

<br>*** Options: <a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech" rel="noreferrer" target="_blank">http://mailman.ecs.soton.ac.<wbr>uk/mailman/listinfo/eprints-<wbr>tech</a><br>
*** Archive: <a href="http://www.eprints.org/tech.php/" rel="noreferrer" target="_blank">http://www.eprints.org/tech.<wbr>php/</a><br>
*** EPrints community wiki: <a href="http://wiki.eprints.org/" rel="noreferrer" target="_blank">http://wiki.eprints.org/</a><br>
*** EPrints developers Forum: <a href="http://forum.eprints.org/" rel="noreferrer" target="_blank">http://forum.eprints.org/</a><br>
<br></blockquote></div></div>