User fields

From EPrints Documentation
Revision as of 00:23, 31 January 2022 by (talk | contribs) (Added page about config file)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects

Back to cfg.d 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.


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" ];