User fields default.pl
Revision as of 00:23, 31 January 2022 by Drn@ecs.soton.ac.uk (talk | contribs) (Added page about config file)
EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects
user_fields_default.pl contains configuration to set the default values for user fields through the set_user_defaults function. This usually happens when a user is created but before it can be edited for the first time.
- $data is a hash reference of the metadata which will make up the user object. Each field name is a key in the hash.
- $repository is a Repository object.
Example
In this example, the default for hideemail is set to true and the default columns to be shown the user is on their Items and Editorial Review pages.
$c->{set_user_defaults} = sub { my( $data, $repository ) = @_; $data->{hideemail} = "TRUE"; # Default columns shown in Items and Editorial Review screens $data->{items_fields} = [ "lastmod", "title", "type", "eprint_status" ]; $data->{review_fields} = [ "status_changed", "title", "type", "userid" ]; };