EPrints Technical Mailing List Archive

Message: #04638


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Re: changing default user type


Hi John,

 

Thanks, I have left the system level registration file alone and made changes in the repo specific file.

 

And now it all works.  We have Wizards J. I don’t know how I missed it…

 

Cheers

Matt.

 

 

 

From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of John Salter
Sent: Wednesday, 2 September 2015 6:22 PM
To: 'eprints-tech@ecs.soton.ac.uk'
Subject: [EP-tech] Re: changing default user type

 

Hi Matt,

I think the magic (that is slightly more magic than yours) may be in this spell:

https://github.com/eprints/eprints/blob/3.3/lib/defaultcfg/cfg.d/registration.pl#L25

 

Cheers,

John

 

From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Matthew Brady
Sent: 02 September 2015 04:14
To: eprints-tech@ecs.soton.ac.uk
Subject: [EP-tech] changing default user type

 

Hi All,

 

I thought this would be a simple experiment… change the default value for a user record when it gets created from ‘user’ to ‘editor’.

 

Altering the local file …/archive/xxxxx/cfg/cfg.d/user_fields_default.pl file to include the line

 

$data->{type} =      "editor";

 

Doesn’t appear to work as expected…

 

Even altering a default (that I didn’t know existed, until I tried to figure out what was going wrong!)

Within …/perl_lib/EPrints/DataObj/User.pm, there is a sub ‘get_system_field_info’, that contains a default setting as well…

 

{ name=>"usertype", type=>"namedset", required=>1,

              set_name=>"user", input_style=>"medium", default_value=>"user" },

 

Anyone got any ideas ?

 

Cheers

 

Matt

 

 
_____________________________________________________________
This email (including any attached files) is confidential and is for the intended recipient(s) only. If you received this email by mistake, please, as a courtesy, tell the sender, then delete this email.
 
The views and opinions are the originator's and do not necessarily reflect those of the University of Southern Queensland. Although all reasonable precautions were taken to ensure that this email contained no viruses at the time it was sent we accept no liability for any losses arising from its receipt.
 
The University of Southern Queensland is a registered provider of education with the Australian Government.
(CRICOS Institution Code QLD 00244B / NSW 02225M, TEQSA PRV12081 )
_____________________________________________________________
This email (including any attached files) is confidential and is for the intended recipient(s) only. If you received this email by mistake, please, as a courtesy, tell the sender, then delete this email.

The views and opinions are the originator's and do not necessarily reflect those of the University of Southern Queensland. Although all reasonable precautions were taken to ensure that this email contained no viruses at the time it was sent we accept no liability for any losses arising from its receipt.

The University of Southern Queensland is a registered provider of education with the Australian Government.
(CRICOS Institution Code QLD 00244B / NSW 02225M, TEQSA PRV12081 )