Difference between revisions of "API:EPrints/DataObj/User"

From EPrints Documentation
Jump to: navigation, search
Line 1: Line 1:
 
<!-- Pod2Wiki=_preamble_  
 
<!-- Pod2Wiki=_preamble_  
 
This page has been automatically generated from the EPrints 3.2 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' comments will be lost.
 
This page has been automatically generated from the EPrints 3.2 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' comments will be lost.
  -->
+
  -->{{API}}{{Pod2Wiki}}{{API:Source|file=EPrints/DataObj/User.pm|package_name=EPrints::DataObj::User}}[[Category:API|User]]<div><!-- Edit below this comment -->
__NOTOC__
 
{{API}}{{Pod2Wiki}}{{API:Source|file=EPrints/DataObj/User.pm|package_name=EPrints::DataObj::User}}[[Category:API|User]]<div><!-- Edit below this comment -->
 
  
  
<!-- Pod2Wiki=head_name --></div>
+
<!-- Pod2Wiki=_private_ --><!-- Pod2Wiki=head_name -->
 
==NAME==
 
==NAME==
 
'''EPrints::DataObj::User''' - Class representing a single user.
 
'''EPrints::DataObj::User''' - Class representing a single user.
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=head_description --></div>
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=head_description -->
 
==DESCRIPTION==
 
==DESCRIPTION==
 
This class represents a single eprint user record and the metadata  associated with it.  
 
This class represents a single eprint user record and the metadata  associated with it.  
Line 22: Line 22:
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=head_system_metadata --></div>
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=head_system_metadata -->
 
==SYSTEM METADATA==
 
==SYSTEM METADATA==
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_userid --></div>
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_userid -->
 
===userid (int)===
 
===userid (int)===
  
Line 39: Line 43:
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_rev_number --></div>
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_rev_number -->
 
===rev_number (int)===
 
===rev_number (int)===
  
Line 49: Line 55:
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_username --></div>
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_username -->
 
===username (text)===
 
===username (text)===
  
Line 59: Line 67:
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_password --></div>
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_password -->
 
===password (secret)===
 
===password (secret)===
  
Line 69: Line 79:
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_usertype --></div>
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_usertype -->
 
===usertype (namedset)===
 
===usertype (namedset)===
  
Line 79: Line 91:
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_newemail --></div>
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_newemail -->
 
===newemail (email)===
 
===newemail (email)===
  
Line 89: Line 103:
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_newpassword --></div>
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_newpassword -->
 
===newpassword (secret)===
 
===newpassword (secret)===
  
Line 99: Line 115:
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_pin --></div>
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_pin -->
 
===pin (text)===
 
===pin (text)===
  
Line 109: Line 127:
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_pinsettime --></div>
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_pinsettime -->
 
===pinsettime (int)===
 
===pinsettime (int)===
  
Line 119: Line 139:
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_joined --></div>
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_joined -->
 
===joined (time)===
 
===joined (time)===
  
Line 129: Line 151:
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_email --></div>
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_email -->
 
===email (email)===
 
===email (email)===
  
Line 139: Line 163:
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_lang --></div>
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_lang -->
 
===lang (namedset) ===
 
===lang (namedset) ===
  
Line 149: Line 175:
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_editperms --></div>
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_editperms -->
 
===editperms (search, multiple)===
 
===editperms (search, multiple)===
  
Line 159: Line 187:
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_frequency --></div>
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_frequency -->
 
===frequency (set)===
 
===frequency (set)===
  
Line 169: Line 199:
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_mailempty --></div>
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_mailempty -->
 
===mailempty (boolean)===
 
===mailempty (boolean)===
  
Line 179: Line 211:
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_preference --></div>
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_preference -->
 
===preference (compound)===
 
===preference (compound)===
  
Line 189: Line 223:
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=head_methods --></div>
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=head_methods -->
 
==METHODS==
 
==METHODS==
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_get_system_field_info --></div>
+
<!-- Pod2Wiki= -->
===$field_info = EPrints::DataObj::User-&gt;get_system_field_info===
+
</div>
 +
<!-- Pod2Wiki=item_get_system_field_info -->
 +
===get_system_field_info===
  
 +
$field_info = EPrints::DataObj::User-&gt;get_system_field_info
 
Return an array describing the system metadata of the this  dataset.
 
Return an array describing the system metadata of the this  dataset.
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_new --></div>
+
<!-- Pod2Wiki= -->
===$user = EPrints::DataObj::User-&gt;new( $session, $userid )===
+
</div>
 +
<!-- Pod2Wiki=item_new -->
 +
===new===
  
 +
$user = EPrints::DataObj::User-&gt;new( $session, $userid )
 
Load the user with the ID of $userid from the database and return it as an EPrints::DataObj::User object.
 
Load the user with the ID of $userid from the database and return it as an EPrints::DataObj::User object.
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_new_from_data --></div>
+
<!-- Pod2Wiki= -->
===$user = EPrints::DataObj::User-&gt;new_from_data( $session, $data )===
+
</div>
 +
<!-- Pod2Wiki=item_new_from_data -->
 +
===new_from_data===
  
 +
$user = EPrints::DataObj::User-&gt;new_from_data( $session, $data )
 
Construct a new EPrints::DataObj::User object based on the $data hash  reference of metadata.
 
Construct a new EPrints::DataObj::User object based on the $data hash  reference of metadata.
  
Line 228: Line 273:
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_get_dataset_id --></div>
+
<!-- Pod2Wiki= -->
===$dataset = EPrints::DataObj::User-&gt;get_dataset_id===
+
</div>
 +
<!-- Pod2Wiki=item_get_dataset_id -->
 +
===get_dataset_id===
  
 +
$dataset = EPrints::DataObj::User-&gt;get_dataset_id
 
Returns the id of the [[API:EPrints/DataSet|EPrints::DataSet]] object to which this record belongs.
 
Returns the id of the [[API:EPrints/DataSet|EPrints::DataSet]] object to which this record belongs.
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_get_defaults --></div>
+
<!-- Pod2Wiki= -->
===$defaults = EPrints::DataObj::User-&gt;get_defaults( $session, $data )===
+
</div>
 +
<!-- Pod2Wiki=item_get_defaults -->
 +
===get_defaults===
  
 +
$defaults = EPrints::DataObj::User-&gt;get_defaults( $session, $data )
 
Return default values for this object based on the starting data.
 
Return default values for this object based on the starting data.
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_user_with_email --></div>
+
<!-- Pod2Wiki= -->
===$user = EPrints::DataObj::User::user_with_email( $session, $email )===
+
</div>
 +
<!-- Pod2Wiki=item_user_with_email -->
 +
===user_with_email===
  
 +
$user = EPrints::DataObj::User::user_with_email( $session, $email )
 
Return the EPrints::user with the specified $email, or undef if they are not found.
 
Return the EPrints::user with the specified $email, or undef if they are not found.
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_user_with_username --></div>
+
<!-- Pod2Wiki= -->
===$user = EPrints::DataObj::User::user_with_username( $session, $username )===
+
</div>
 +
<!-- Pod2Wiki=item_user_with_username -->
 +
===user_with_username===
  
 +
$user = EPrints::DataObj::User::user_with_username( $session, $username )
 
Return the EPrints::user with the specified $username, or undef if  they are not found.
 
Return the EPrints::user with the specified $username, or undef if  they are not found.
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_validate --></div>
+
<!-- Pod2Wiki= -->
===$problems = $thing-&gt;validate===
+
</div>
 +
<!-- Pod2Wiki=item_validate -->
 +
===validate===
  
 +
$problems = $thing-&gt;validate
 
Validate the user - find out if all the required fields are filled out, and that what's been filled in is OK. Returns a reference to an array of problem descriptions.
 
Validate the user - find out if all the required fields are filled out, and that what's been filled in is OK. Returns a reference to an array of problem descriptions.
  
Line 282: Line 342:
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_commit --></div>
+
<!-- Pod2Wiki= -->
===$user-&gt;commit( [$force] )===
+
</div>
 +
<!-- Pod2Wiki=item_commit -->
 +
===commit===
  
 +
$user-&gt;commit( [$force] )
 
Write this object to the database.
 
Write this object to the database.
  
Line 294: Line 357:
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_remove --></div>
+
<!-- Pod2Wiki= -->
===$success = $user-&gt;remove===
+
</div>
 +
<!-- Pod2Wiki=item_remove -->
 +
===remove===
  
 +
$success = $user-&gt;remove
 
Remove this user from the database. Also, remove their saved searches, but do not remove their eprints.
 
Remove this user from the database. Also, remove their saved searches, but do not remove their eprints.
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_owned_eprints_list --></div>
+
<!-- Pod2Wiki= -->
===$list = $user-&gt;owned_eprints_list( %opts )===
+
</div>
 +
<!-- Pod2Wiki=item_owned_eprints_list -->
 +
===owned_eprints_list===
  
 +
$list = $user-&gt;owned_eprints_list( %opts )
 
Returns a [[API:EPrints/List|EPrints::List]] of all the [[API:EPrints/DataObj/EPrint|EPrints::DataObj::EPrint]]s owned by this user.
 
Returns a [[API:EPrints/List|EPrints::List]] of all the [[API:EPrints/DataObj/EPrint|EPrints::DataObj::EPrint]]s owned by this user.
  
Line 316: Line 385:
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_editable_eprints_list --></div>
+
<!-- Pod2Wiki= -->
===$list = $user-&gt;editable_eprints_list( %opts )===
+
</div>
 +
<!-- Pod2Wiki=item_editable_eprints_list -->
 +
===editable_eprints_list===
  
 +
$list = $user-&gt;editable_eprints_list( %opts )
 
Returns a [[API:EPrints/List|EPrints::List]] of [[API:EPrints/DataObj/EPrint|EPrints::DataObj::EPrint]]s that match this user's editorial search expressions. If the user has no editorial scope a list of all buffered eprints is returned.
 
Returns a [[API:EPrints/List|EPrints::List]] of [[API:EPrints/DataObj/EPrint|EPrints::DataObj::EPrint]]s that match this user's editorial search expressions. If the user has no editorial scope a list of all buffered eprints is returned.
  
Line 328: Line 400:
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_get_eprints --></div>
+
<!-- Pod2Wiki= -->
===$list = $user-&gt;get_eprints( $dataset )===
+
</div>
 +
<!-- Pod2Wiki=item_get_eprints -->
 +
===get_eprints===
  
 +
$list = $user-&gt;get_eprints( $dataset )
 
DEPRECATED
 
DEPRECATED
  
Line 342: Line 417:
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_get_editable_eprints --></div>
+
<!-- Pod2Wiki= -->
===$list = $user-&gt;get_editable_eprints===
+
</div>
 +
<!-- Pod2Wiki=item_get_editable_eprints -->
 +
===get_editable_eprints===
  
 +
$list = $user-&gt;get_editable_eprints
 
DEPRECATED
 
DEPRECATED
  
Line 356: Line 434:
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_get_owned_eprints --></div>
+
<!-- Pod2Wiki= -->
===$list = $user-&gt;get_owned_eprints( $dataset );===
+
</div>
 +
<!-- Pod2Wiki=item_get_owned_eprints -->
 +
===get_owned_eprints===
  
 +
$list = $user-&gt;get_owned_eprints( $dataset );
 
DEPRECATED
 
DEPRECATED
  
Line 370: Line 451:
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_has_owner --></div>
+
<!-- Pod2Wiki= -->
===$boolean = $user-&gt;has_owner( $possible_owner )===
+
</div>
 +
<!-- Pod2Wiki=item_has_owner -->
 +
===has_owner===
  
 +
$boolean = $user-&gt;has_owner( $possible_owner )
 
True if the users are the same record.
 
True if the users are the same record.
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_mail --></div>
+
<!-- Pod2Wiki= -->
===$ok = $user-&gt;mail( $subjectid, $message, [$replyto], [$email] )===
+
</div>
 +
<!-- Pod2Wiki=item_mail -->
 +
===mail===
  
 +
$ok = $user-&gt;mail( $subjectid, $message, [$replyto], [$email] )
 
Send an email to this user.  
 
Send an email to this user.  
  
Line 400: Line 487:
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_render --></div>
+
<!-- Pod2Wiki= -->
===( $page, $title ) = $user-&gt;render===
+
</div>
 +
<!-- Pod2Wiki=item_render -->
 +
===render===
  
 +
( $page, $title ) = $user-&gt;render
 
Render this user into HTML using the "user_render" method in ArchiveRenderConfig.pm. Returns both the rendered information and the title as XHTML DOM.
 
Render this user into HTML using the "user_render" method in ArchiveRenderConfig.pm. Returns both the rendered information and the title as XHTML DOM.
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_render_full --></div>
+
<!-- Pod2Wiki= -->
===( $page, $title ) = $user-&gt;render_full===
+
</div>
 +
<!-- Pod2Wiki=item_render_full -->
 +
===render_full===
  
 +
( $page, $title ) = $user-&gt;render_full
 
The same as $user-&gt;render, but renders all fields, not just those  intended for public viewing. This is the admin view of the user.
 
The same as $user-&gt;render, but renders all fields, not just those  intended for public viewing. This is the admin view of the user.
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_get_url --></div>
+
<!-- Pod2Wiki= -->
===$url = $user-&gt;get_url===
+
</div>
 +
<!-- Pod2Wiki=item_get_url -->
 +
===get_url===
  
 +
$url = $user-&gt;get_url
 
Return the URL which will display information about this user.
 
Return the URL which will display information about this user.
  
Line 432: Line 528:
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_get_type --></div>
+
<!-- Pod2Wiki= -->
===$type = $user-&gt;get_type===
+
</div>
 +
<!-- Pod2Wiki=item_get_type -->
 +
===get_type===
  
 +
$type = $user-&gt;get_type
 
Return the type of this user. Equivalent of  $user-&gt;get_value( "usertype" );
 
Return the type of this user. Equivalent of  $user-&gt;get_value( "usertype" );
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_get_saved_searches --></div>
+
<!-- Pod2Wiki= -->
===@saved_searches = $eprint-&gt;get_saved_searches===
+
</div>
 +
<!-- Pod2Wiki=item_get_saved_searches -->
 +
===get_saved_searches===
  
 +
@saved_searches = $eprint-&gt;get_saved_searches
 
Return an array of all EPrint::DataObj::SavedSearch objects associated with this user.
 
Return an array of all EPrint::DataObj::SavedSearch objects associated with this user.
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_preference --></div>
+
<!-- Pod2Wiki= -->
===$value = $user-&gt;preference( $key )===
+
</div>
 +
<!-- Pod2Wiki=item_preference -->
 +
===preference===
  
 +
$value = $user-&gt;preference( $key )
 
Retrieve the preference $key.
 
Retrieve the preference $key.
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_set_preference --></div>
+
<!-- Pod2Wiki= -->
===$user-&gt;set_preference( $key, $value )===
+
</div>
 +
<!-- Pod2Wiki=item_set_preference -->
 +
===set_preference===
  
 +
$user-&gt;set_preference( $key, $value )
 
Set a preference $key for the user to $value.
 
Set a preference $key for the user to $value.
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_send_out_editor_alert --></div>
+
<!-- Pod2Wiki= -->
===$user-&gt;send_out_editor_alert===
+
</div>
 +
<!-- Pod2Wiki=item_send_out_editor_alert -->
 +
===send_out_editor_alert===
  
 +
$user-&gt;send_out_editor_alert
 
Called on users who are editors, when it's time to send their update on what items are in the editorial review buffer.
 
Called on users who are editors, when it's time to send their update on what items are in the editorial review buffer.
  
Line 484: Line 595:
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_process_editor_alerts --></div>
+
<!-- Pod2Wiki= -->
===EPrints::DataObj::User::process_editor_alerts( $session, $frequency );===
+
</div>
 +
<!-- Pod2Wiki=item_process_editor_alerts -->
 +
===process_editor_alerts===
  
 +
EPrints::DataObj::User::process_editor_alerts( $session, $frequency );
 
Static method.
 
Static method.
  
Line 496: Line 610:
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
<!-- Pod2Wiki=item_allow --></div>
+
<!-- Pod2Wiki= -->
===$result = $user-&gt;allow( $priv, [$item] )===
+
</div>
 +
<!-- Pod2Wiki=item_allow -->
 +
===allow===
  
 +
$result = $user-&gt;allow( $priv, [$item] )
 
Returns true if $user can perform this action/view this screen.
 
Returns true if $user can perform this action/view this screen.
  
Line 514: Line 631:
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<h4><span style='display:none'>User Comments</span></h4>
+
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
 +
<!-- Pod2Wiki= -->
 +
</div>
 
<!-- Pod2Wiki=_postamble_ --><!-- Edit below this comment -->
 
<!-- Pod2Wiki=_postamble_ --><!-- Edit below this comment -->

Revision as of 13:21, 25 February 2010

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


API: Core API

Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki


NAME

EPrints::DataObj::User - Class representing a single user.

User Comments


DESCRIPTION

This class represents a single eprint user record and the metadata associated with it.

EPrints::DataObj::User is a subclass of EPrints::DataObj with the following metadata fields (plus those defined in ArchiveMetadataFieldsConfig:

User Comments


SYSTEM METADATA

User Comments


userid (int)

The unique ID number of this user record. Unique within the current repository.

User Comments


rev_number (int)

The revision number of this record. Each time it is changed the revision number is increased. This is not currently used for anything but it may be used for logging later.

User Comments


username (text)

The username of this user. Used for logging into the system. Unique within this repository.

User Comments


password (secret)

The password of this user encoded with crypt. This may be ignored if the repository is using an alternate authentication system, eg. LDAP.

User Comments


usertype (namedset)

The type of this user. The options are configured in metadata-phrases.xml.

User Comments


newemail (email)

Used to store a new but as yet unconfirmed email address.

User Comments


newpassword (secret)

Used to store a new but as yet unconfirmed password.

User Comments


pin (text)

A code required to confirm a new username or password. This code is emailed to the user to confirm they are who they say they are.

User Comments


pinsettime (int)

When the pin code was set, so we can make it time out.

User Comments


joined (time)

The date and time that the user account was created. Before EPrints 2.4 this was a date field so users created before the upgrade will appear to have been created at midnight.

User Comments


email (email)

The email address of this user. Unique within the repository.

User Comments


lang (namedset)

The ID of the prefered language of this user. Only really used in multilingual repositories.

User Comments


editperms (search, multiple)

This field is used to filter what eprints a staff member can approve and modify. If it's unset then they can modify any (given the correct privs. but if it is set then an eprint must match at least one of the searches to be within their scope.

User Comments


frequency (set)

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.

User Comments


mailempty (boolean)

Only relevant to staff accounts. If set to true then emails are sent even if there are no items matching the scope.

User Comments


preference (compound)

User preferences which need to be persistent (simple key-value pairs).

User Comments


METHODS

User Comments


get_system_field_info

$field_info = EPrints::DataObj::User->get_system_field_info

Return an array describing the system metadata of the this dataset.

User Comments


new

$user = EPrints::DataObj::User->new( $session, $userid )

Load the user with the ID of $userid from the database and return it as an EPrints::DataObj::User object.

User Comments


new_from_data

$user = EPrints::DataObj::User->new_from_data( $session, $data )

Construct a new EPrints::DataObj::User object based on the $data hash reference of metadata.

Used to create an object from the data retrieved from the database.

User Comments


get_dataset_id

$dataset = EPrints::DataObj::User->get_dataset_id

Returns the id of the EPrints::DataSet object to which this record belongs.

User Comments


get_defaults

$defaults = EPrints::DataObj::User->get_defaults( $session, $data )

Return default values for this object based on the starting data.

User Comments


user_with_email

$user = EPrints::DataObj::User::user_with_email( $session, $email )

Return the EPrints::user with the specified $email, or undef if they are not found.

User Comments


user_with_username

$user = EPrints::DataObj::User::user_with_username( $session, $username )

Return the EPrints::user with the specified $username, or undef if they are not found.

User Comments


validate

$problems = $thing->validate

Validate the user - find out if all the required fields are filled out, and that what's been filled in is OK. Returns a reference to an array of problem descriptions.

If there are no probelms then the array is empty.

The problems are XHTML DOM objects describing the problem.

User Comments


commit

$user->commit( [$force] )

Write this object to the database.

If $force isn't true then it only actually modifies the database if one or more fields have been changed.

User Comments


remove

$success = $user->remove

Remove this user from the database. Also, remove their saved searches, but do not remove their eprints.

User Comments


owned_eprints_list

$list = $user->owned_eprints_list( %opts )

Returns a EPrints::List of all the EPrints::DataObj::EPrints owned by this user.

%opts is passed to a EPrints::Search which is used to filter the results.

User Comments


editable_eprints_list

$list = $user->editable_eprints_list( %opts )

Returns a EPrints::List of EPrints::DataObj::EPrints that match this user's editorial search expressions. If the user has no editorial scope a list of all buffered eprints is returned.

%opts is passed to a EPrints::Search which is used to filter the results.

User Comments


get_eprints

$list = $user->get_eprints( $dataset )

DEPRECATED

Return EPrints in the given EPrints::DataSet which have this user as their creator.

Since 2.4 this returns an EPrints::List object, not an array of eprints.

User Comments


get_editable_eprints

$list = $user->get_editable_eprints

DEPRECATED

Return eprints currently in the editorial review buffer. If this user has editperms set then only return those records which match.

Since 2.4 this returns an EPrints::List object, not an array of eprints.

User Comments


get_owned_eprints

$list = $user->get_owned_eprints( $dataset );

DEPRECATED

Return a list of the eprints which this user owns. This is by default the same as $user->get_eprints( $dataset) but may be over-ridden by get_users_owned_eprints.

Since 2.4 this returns an EPrints::List object, not an array of eprints.

User Comments


has_owner

$boolean = $user->has_owner( $possible_owner )

True if the users are the same record.

User Comments


mail

$ok = $user->mail( $subjectid, $message, [$replyto], [$email] )

Send an email to this user.

$subjectid is the ID of a phrase to use as the subject of this email.

$message is an XML DOM object describing the message in simple XHTML.

$replyto is the reply to address for this email, if different to the repository default.

$email is the email address to send this email to if different from this users configured email address.

Return true if the email was sent OK.

User Comments


render

( $page, $title ) = $user->render

Render this user into HTML using the "user_render" method in ArchiveRenderConfig.pm. Returns both the rendered information and the title as XHTML DOM.

User Comments


render_full

( $page, $title ) = $user->render_full

The same as $user->render, but renders all fields, not just those intended for public viewing. This is the admin view of the user.

User Comments


get_url

$url = $user->get_url

Return the URL which will display information about this user.

If $staff is true then return the URL for an administrator to view and modify this record.

User Comments


get_type

$type = $user->get_type

Return the type of this user. Equivalent of $user->get_value( "usertype" );

User Comments


get_saved_searches

@saved_searches = $eprint->get_saved_searches

Return an array of all EPrint::DataObj::SavedSearch objects associated with this user.

User Comments


preference

$value = $user->preference( $key )

Retrieve the preference $key.

User Comments


set_preference

$user->set_preference( $key, $value )

Set a preference $key for the user to $value.

User Comments


send_out_editor_alert

$user->send_out_editor_alert

Called on users who are editors, when it's time to send their update on what items are in the editorial review buffer.

Sends the email if needed.

User Comments


process_editor_alerts

EPrints::DataObj::User::process_editor_alerts( $session, $frequency );

Static method.

Called to send out all editor alerts of a given frequency (daily, weekly, monthly) for the current repository.

User Comments


allow

$result = $user->allow( $priv, [$item] )

Returns true if $user can perform this action/view this screen.

A true result is 1..15 where the value indicates what about the user allowed the priv to be performed. This is used for filtering owner/ editor actions in eprint control screens.

1 = anybody (not currently used) 2 = only if logged in 4 = only if owner of item 8 = only if editor of item

For non item related privs the result will normally be 2.

Nb. That create eprint is NOT a priv related to an eprint, as you don't own it at that stage.

User Comments