<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.eprints.org/w/index.php?action=history&amp;feed=atom&amp;title=User_fields_default.pl</id>
	<title>User fields default.pl - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.eprints.org/w/index.php?action=history&amp;feed=atom&amp;title=User_fields_default.pl"/>
	<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=User_fields_default.pl&amp;action=history"/>
	<updated>2026-04-29T02:55:02Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.8</generator>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=User_fields_default.pl&amp;diff=14415&amp;oldid=prev</id>
		<title>Drn@ecs.soton.ac.uk: Added page about config file</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=User_fields_default.pl&amp;diff=14415&amp;oldid=prev"/>
		<updated>2022-01-31T00:23:22Z</updated>

		<summary type="html">&lt;p&gt;Added page about config file&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{dirs}}&lt;br /&gt;
{{cfgd}}&lt;br /&gt;
&lt;br /&gt;
'''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.&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;tt&amp;gt;$data&amp;lt;/tt&amp;gt;''' is a hash reference of the metadata which will make up the user object. Each field name is a key in the hash.&lt;br /&gt;
* '''&amp;lt;tt&amp;gt;$repository&amp;lt;/tt&amp;gt;''' is a [[API:EPrints/Repository|Repository]] object.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$c-&amp;gt;{set_user_defaults} = sub&lt;br /&gt;
{&lt;br /&gt;
    my( $data, $repository ) = @_;&lt;br /&gt;
&lt;br /&gt;
    $data-&amp;gt;{hideemail} = &amp;quot;TRUE&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    # Default columns shown in Items and Editorial Review screens&lt;br /&gt;
    $data-&amp;gt;{items_fields} = [ &amp;quot;lastmod&amp;quot;, &amp;quot;title&amp;quot;, &amp;quot;type&amp;quot;, &amp;quot;eprint_status&amp;quot; ];&lt;br /&gt;
    $data-&amp;gt;{review_fields} = [ &amp;quot;status_changed&amp;quot;, &amp;quot;title&amp;quot;, &amp;quot;type&amp;quot;, &amp;quot;userid&amp;quot; ];&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Drn@ecs.soton.ac.uk</name></author>
		
	</entry>
</feed>