<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?action=history&amp;feed=atom&amp;title=API_EPrints%2FDataObj%2FUser</id>
	<title>API EPrints/DataObj/User - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?action=history&amp;feed=atom&amp;title=API_EPrints%2FDataObj%2FUser"/>
	<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=API_EPrints/DataObj/User&amp;action=history"/>
	<updated>2026-05-09T15:20:57Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=API_EPrints/DataObj/User&amp;diff=6629&amp;oldid=prev</id>
		<title>Tdb01r: Removing all content from page</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=API_EPrints/DataObj/User&amp;diff=6629&amp;oldid=prev"/>
		<updated>2009-08-10T16:30:09Z</updated>

		<summary type="html">&lt;p&gt;Removing all content from page&lt;/p&gt;
&lt;a href=&quot;https://wiki.ext-9.eprints-hosting.org/w/index.php?title=API_EPrints/DataObj/User&amp;amp;diff=6629&amp;amp;oldid=6622&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Tdb01r</name></author>
	</entry>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=API_EPrints/DataObj/User&amp;diff=6622&amp;oldid=prev</id>
		<title>Tdb01r: New page: &lt;!-- Pod2Wiki=_preamble_  This page has been automatically generated from the EPrints source. Any wiki changes made between the &#039;Pod2Wiki=*&#039; and &#039;End of Pod2Wiki&#039; comments will be lost.  -...</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=API_EPrints/DataObj/User&amp;diff=6622&amp;oldid=prev"/>
		<updated>2009-08-10T16:25:03Z</updated>

		<summary type="html">&lt;p&gt;New page: &amp;lt;!-- Pod2Wiki=_preamble_  This page has been automatically generated from the EPrints source. Any wiki changes made between the &amp;#039;Pod2Wiki=*&amp;#039; and &amp;#039;End of Pod2Wiki&amp;#039; comments will be lost.  -...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;!-- Pod2Wiki=_preamble_ &lt;br /&gt;
This page has been automatically generated from the EPrints source. Any wiki changes made between the &amp;#039;Pod2Wiki=*&amp;#039; and &amp;#039;End of Pod2Wiki&amp;#039; comments will be lost.&lt;br /&gt;
 --&amp;gt;[[Category:API]]&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_name --&amp;gt;=NAME=&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;EPrints::DataObj::User&amp;#039;&amp;#039;&amp;#039; - Class representing a single user.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_description --&amp;gt;=DESCRIPTION=&lt;br /&gt;
This class represents a single eprint user record and the metadata associated with it. &lt;br /&gt;
EPrints::DataObj::User is a subclass of EPrints::DataObj with the followingmetadata fields (plus those defined in ArchiveMetadataFieldsConfig:&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_system_metadata --&amp;gt;=SYSTEM METADATA=&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_userid --&amp;gt;==userid==&lt;br /&gt;
&lt;br /&gt;
  userid (int)&lt;br /&gt;
&lt;br /&gt;
The unique ID number of this user record. Unique within the current repository.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_rev_number --&amp;gt;==rev_number==&lt;br /&gt;
&lt;br /&gt;
  rev_number (int)&lt;br /&gt;
&lt;br /&gt;
The revision number of this record. Each time it is changed the revisionnumber is increased. This is not currently used for anything but it maybe used for logging later.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_username --&amp;gt;==username==&lt;br /&gt;
&lt;br /&gt;
  username (text)&lt;br /&gt;
&lt;br /&gt;
The username of this user. Used for logging into the system. Unique withinthis repository.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_password --&amp;gt;==password==&lt;br /&gt;
&lt;br /&gt;
  password (secret)&lt;br /&gt;
&lt;br /&gt;
The password of this user encoded with crypt. This may be ignored if therepository is using an alternate authentication system, eg. LDAP.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_usertype --&amp;gt;==usertype==&lt;br /&gt;
&lt;br /&gt;
  usertype (namedset)&lt;br /&gt;
&lt;br /&gt;
The type of this user. The options are configured in metadata-phrases.xml.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_newemail --&amp;gt;==newemail==&lt;br /&gt;
&lt;br /&gt;
  newemail (email)&lt;br /&gt;
&lt;br /&gt;
Used to store a new but as yet unconfirmed email address.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_newpassword --&amp;gt;==newpassword==&lt;br /&gt;
&lt;br /&gt;
  newpassword (secret)&lt;br /&gt;
&lt;br /&gt;
Used to store a new but as yet unconfirmed password.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_pin --&amp;gt;==pin==&lt;br /&gt;
&lt;br /&gt;
  pin (text)&lt;br /&gt;
&lt;br /&gt;
A code required to confirm a new username or password. This code is emailedto the user to confirm they are who they say they are.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_pinsettime --&amp;gt;==pinsettime==&lt;br /&gt;
&lt;br /&gt;
  pinsettime (int)&lt;br /&gt;
&lt;br /&gt;
When the pin code was set, so we can make it time out.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_joined --&amp;gt;==joined==&lt;br /&gt;
&lt;br /&gt;
  joined (time)&lt;br /&gt;
&lt;br /&gt;
The date and time that the user account was created. Before EPrints 2.4 thiswas a date field so users created before the upgrade will appear to have been created at midnight.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_email --&amp;gt;==email==&lt;br /&gt;
&lt;br /&gt;
  email (email)&lt;br /&gt;
&lt;br /&gt;
The email address of this user. Unique within the repository. &lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_lang --&amp;gt;==lang==&lt;br /&gt;
&lt;br /&gt;
  lang (namedset) &lt;br /&gt;
&lt;br /&gt;
The ID of the prefered language of this user. Only really used in multilingualrepositories.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_editperms --&amp;gt;==editperms==&lt;br /&gt;
&lt;br /&gt;
  editperms (search, multiple)&lt;br /&gt;
&lt;br /&gt;
This field is used to filter what eprints a staff member can approve and modify. If it&amp;#039;s unset then they can modify any (given the correct privs. butif it is set then an eprint must match at least one of the searches to bewithin their scope.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_frequency --&amp;gt;==frequency==&lt;br /&gt;
&lt;br /&gt;
  frequency (set)&lt;br /&gt;
&lt;br /&gt;
Only relevant to staff accounts. Is the frequency they want to be mailed about eprints matching their scope that are in editorial review. never, daily, weekly or monthly.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_mailempty --&amp;gt;==mailempty==&lt;br /&gt;
&lt;br /&gt;
  mailempty (boolean)&lt;br /&gt;
&lt;br /&gt;
Only relevant to staff accounts. If set to true then emails are senteven if there are no items matching the scope.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=head_methods --&amp;gt;=METHODS=&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_get_system_field_info --&amp;gt;==get_system_field_info==&lt;br /&gt;
&lt;br /&gt;
  $field_info = EPrints::DataObj::User-&amp;amp;gt;get_system_field_info&lt;br /&gt;
&lt;br /&gt;
Return an array describing the system metadata of the this dataset.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_new --&amp;gt;==new==&lt;br /&gt;
&lt;br /&gt;
  $user = EPrints::DataObj::User-&amp;amp;gt;new( $session, $userid )&lt;br /&gt;
&lt;br /&gt;
Load the user with the ID of $userid from the database and returnit as an EPrints::DataObj::User object.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_new_from_data --&amp;gt;==new_from_data==&lt;br /&gt;
&lt;br /&gt;
  $user = EPrints::DataObj::User-&amp;amp;gt;new_from_data( $session, $data )&lt;br /&gt;
&lt;br /&gt;
Construct a new EPrints::DataObj::User object based on the $data hash reference of metadata.&lt;br /&gt;
Used to create an object from the data retrieved from the database.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_get_dataset_id --&amp;gt;==get_dataset_id==&lt;br /&gt;
&lt;br /&gt;
  $dataset = EPrints::DataObj::User-&amp;amp;gt;get_dataset_id&lt;br /&gt;
&lt;br /&gt;
Returns the id of the [[API_EPrints/DataSet]] object to which this record belongs.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_get_defaults --&amp;gt;==get_defaults==&lt;br /&gt;
&lt;br /&gt;
  $defaults = EPrints::DataObj::User-&amp;amp;gt;get_defaults( $session, $data )&lt;br /&gt;
&lt;br /&gt;
Return default values for this object based on the starting data.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_user_with_email --&amp;gt;==user_with_email==&lt;br /&gt;
&lt;br /&gt;
  $user = EPrints::DataObj::User::user_with_email( $session, $email )&lt;br /&gt;
&lt;br /&gt;
Return the EPrints::user with the specified $email, or undef if theyare not found.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_user_with_username --&amp;gt;==user_with_username==&lt;br /&gt;
&lt;br /&gt;
  $user = EPrints::DataObj::User::user_with_username( $session, $username )&lt;br /&gt;
&lt;br /&gt;
Return the EPrints::user with the specified $username, or undef if they are not found.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_validate --&amp;gt;==validate==&lt;br /&gt;
&lt;br /&gt;
  $problems = $thing-&amp;amp;gt;validate&lt;br /&gt;
&lt;br /&gt;
Validate the user - find out if all the required fields are filledout, and that what&amp;#039;s been filled in is OK. Returns a reference to anarray of problem descriptions.&lt;br /&gt;
If there are no probelms then the array is empty.&lt;br /&gt;
The problems are XHTML DOM objects describing the problem.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_commit --&amp;gt;==commit==&lt;br /&gt;
&lt;br /&gt;
  $user-&amp;amp;gt;commit( [$force] )&lt;br /&gt;
&lt;br /&gt;
Write this object to the database.&lt;br /&gt;
If $force isn&amp;#039;t true then it only actually modifies the databaseif one or more fields have been changed.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_remove --&amp;gt;==remove==&lt;br /&gt;
&lt;br /&gt;
  $success = $user-&amp;amp;gt;remove&lt;br /&gt;
&lt;br /&gt;
Remove this user from the database. Also, remove their saved searches,but do not remove their eprints.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_get_eprints --&amp;gt;==get_eprints==&lt;br /&gt;
&lt;br /&gt;
  $list = $user-&amp;amp;gt;get_eprints( $dataset )&lt;br /&gt;
&lt;br /&gt;
Return EPrints in the given EPrints::DataSet which have this useras their creator.&lt;br /&gt;
Since 2.4 this returns an EPrints::List object, not an array of eprints.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_get_editable_eprints --&amp;gt;==get_editable_eprints==&lt;br /&gt;
&lt;br /&gt;
  $list = $user-&amp;amp;gt;get_editable_eprints&lt;br /&gt;
&lt;br /&gt;
Return eprints currently in the editorial review buffer. If this userhas editperms set then only return those records which match.&lt;br /&gt;
Since 2.4 this returns an EPrints::List object, not an array of eprints.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_get_owned_eprints --&amp;gt;==get_owned_eprints==&lt;br /&gt;
&lt;br /&gt;
  $list = $user-&amp;amp;gt;get_owned_eprints( $dataset );&lt;br /&gt;
&lt;br /&gt;
Return a list of the eprints which this user owns. This is by defaultthe same as $user-&amp;amp;gt;get_eprints( $dataset) but may be over-ridden byget_users_owned_eprints.&lt;br /&gt;
Since 2.4 this returns an EPrints::List object, not an array of eprints.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_has_owner --&amp;gt;==has_owner==&lt;br /&gt;
&lt;br /&gt;
  $boolean = $user-&amp;amp;gt;has_owner( $possible_owner )&lt;br /&gt;
&lt;br /&gt;
True if the users are the same record.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_mail --&amp;gt;==mail==&lt;br /&gt;
&lt;br /&gt;
  $ok = $user-&amp;amp;gt;mail( $subjectid, $message, [$replyto], [$email] )&lt;br /&gt;
&lt;br /&gt;
Send an email to this user. &lt;br /&gt;
$subjectid is the ID of a phrase to use as the subject of this email.&lt;br /&gt;
$message is an XML DOM object describing the message in simple XHTML.&lt;br /&gt;
$replyto is the reply to address for this email, if different to therepository default.&lt;br /&gt;
$email is the email address to send this email to if different fromthis users configured email address.&lt;br /&gt;
Return true if the email was sent OK.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_render --&amp;gt;==render==&lt;br /&gt;
&lt;br /&gt;
  ( $page, $title ) = $user-&amp;amp;gt;render&lt;br /&gt;
&lt;br /&gt;
Render this user into HTML using the &amp;quot;user_render&amp;quot; method inArchiveRenderConfig.pm. Returns both the rendered information andthe title as XHTML DOM.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_render_full --&amp;gt;==render_full==&lt;br /&gt;
&lt;br /&gt;
  ( $page, $title ) = $user-&amp;amp;gt;render_full&lt;br /&gt;
&lt;br /&gt;
The same as $user-&amp;amp;gt;render, but renders all fields, not just those intended for public viewing. This is the admin view of the user.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_get_url --&amp;gt;==get_url==&lt;br /&gt;
&lt;br /&gt;
  $url = $user-&amp;amp;gt;get_url&lt;br /&gt;
&lt;br /&gt;
Return the URL which will display information about this user.&lt;br /&gt;
If $staff is true then return the URL for an administrator to viewand modify this record.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_get_type --&amp;gt;==get_type==&lt;br /&gt;
&lt;br /&gt;
  $type = $user-&amp;amp;gt;get_type&lt;br /&gt;
&lt;br /&gt;
Return the type of this user. Equivalent of $user-&amp;amp;gt;get_value( &amp;quot;usertype&amp;quot; );&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_get_saved_searches --&amp;gt;==get_saved_searches==&lt;br /&gt;
&lt;br /&gt;
  @saved_searches = $eprint-&amp;amp;gt;get_saved_searches&lt;br /&gt;
&lt;br /&gt;
Return an array of all EPrint::DataObj::SavedSearch objects associated with thisuser.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_send_out_editor_alert --&amp;gt;==send_out_editor_alert==&lt;br /&gt;
&lt;br /&gt;
  $user-&amp;amp;gt;send_out_editor_alert&lt;br /&gt;
&lt;br /&gt;
Called on users who are editors, when it&amp;#039;s time to send their updateon what items are in the editorial review buffer.&lt;br /&gt;
Sends the email if needed.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_process_editor_alerts --&amp;gt;==process_editor_alerts==&lt;br /&gt;
&lt;br /&gt;
  EPrints::DataObj::User::process_editor_alerts( $session, $frequency );&lt;br /&gt;
&lt;br /&gt;
Static method.&lt;br /&gt;
Called to send out all editor alerts of a given frequency (daily,weekly, monthly) for the current repository.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=item_allow --&amp;gt;==allow==&lt;br /&gt;
&lt;br /&gt;
  $result = $user-&amp;amp;gt;allow( $priv, [$item] )&lt;br /&gt;
&lt;br /&gt;
Returns true if $user can perform this action/view this screen.&lt;br /&gt;
A true result is 1..15 where the value indicates what about the userallowed the priv to be performed. This is used for filtering owner/editor actions in eprint control screens.&lt;br /&gt;
1 = anybody (not currently used)2 = only if logged in 4 = only if owner of item8 = only if editor of item&lt;br /&gt;
For non item related privs the result will normally be 2.&lt;br /&gt;
Nb. That create eprint is NOT a priv related to an eprint, as you don&amp;#039;t own it at that stage.&lt;br /&gt;
&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Pod2Wiki=_postamble_ --&amp;gt;&amp;lt;!-- End of Pod2Wiki --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tdb01r</name></author>
	</entry>
</feed>