Open Journal Systems  2.4.4
 All Classes Namespaces Functions Variables Groups Pages
PKPUserDAO Class Reference
Inheritance diagram for PKPUserDAO:
DAO UserDAO

Public Member Functions

_returnUserFromRow (&$row, $callHook=true)
 
 deleteObject (&$user)
 
 deleteUserById ($userId)
 
getById ($userId, $allowDisabled=true)
 
getByUsername ($username, $allowDisabled=true)
 
 getGenderOptions ()
 
 getInsertUserId ()
 
getUserByAuthStr ($authstr, $allowDisabled=true)
 
getUserByCredentials ($username, $password, $allowDisabled=true)
 
getUserByEmail ($email, $allowDisabled=true)
 
 getUserEmail ($userId, $allowDisabled=true)
 
 getUserFullName ($userId, $allowDisabled=true)
 
getUsersByField ($field=USER_FIELD_NONE, $match=null, $value=null, $allowDisabled=true, $dbResultRange=null, $sortBy=null, $sortDirection=SORT_DIRECTION_ASC)
 
getUsersWithNoRole ($allowDisabled=true, $dbResultRange=null)
 
 insertUser (&$user)
 
 PKPUserDAO ()
 
 updateObject (&$user)
 
 userExistsByEmail ($email, $userId=null, $allowDisabled=true)
 
 userExistsById ($userId, $allowDisabled=true)
 
 userExistsByUsername ($username, $userId=null, $allowDisabled=true)
 
- Public Member Functions inherited from DAO
 concat ()
 
 convertFromDB ($value, $type)
 
 convertToDB ($value, &$type)
 
 DAO ($dataSource=null, $callHooks=true)
 
 dateFromDB ($d)
 
 datetimeFromDB ($dt)
 
 datetimeToDB ($dt)
 
 dateToDB ($d)
 
 flushCache ()
 
 formatDateToDB ($date, $defaultNumWeeks=null, $acceptPastDate=true)
 
 getAffectedRows ()
 
 getDataChangedEvent ($elementId=null, $parentElementId=null)
 
getDataSource ()
 
 getDirectionMapping ($direction)
 
 getDriver ()
 
 getInsertId ($table= '', $id= '', $callHooks=true)
 
 getType ($value)
 
 replace ($table, $arrFields, $keyCols)
 
retrieve ($sql, $params=false, $callHooks=true)
 
retrieveCached ($sql, $params=false, $secsToCache=3600, $callHooks=true)
 
retrieveLimit ($sql, $params=false, $numRows=false, $offset=false, $callHooks=true)
 
retrieveRange ($sql, $params=false, $dbResultRange=null, $callHooks=true)
 
 setCacheDir ()
 
 setDataSource (&$dataSource)
 
 update ($sql, $params=false, $callHooks=true, $dieOnError=true)
 
 updateDataObjectSettings ($tableName, &$dataObject, $idArray)
 

Additional Inherited Members

- Public Attributes inherited from DAO
 $_dataSource
 

Detailed Description

Operations for retrieving and modifying User objects.

See Also
User

Definition at line 30 of file PKPUserDAO.inc.php.

Member Function Documentation

& PKPUserDAO::_returnUserFromRow ( $row,
  $callHook = true 
)

Internal function to return a User object from a row.

Parameters
$rowarray
$callHookboolean
Returns
User

Definition at line 171 of file PKPUserDAO.inc.php.

References HookRegistry\call(), and DAO\datetimeFromDB().

PKPUserDAO::deleteObject ( $user)

Delete a user.

Parameters
$userUser

Definition at line 345 of file PKPUserDAO.inc.php.

References deleteUserById().

PKPUserDAO::deleteUserById (   $userId)

Delete a user by ID.

Parameters
$userIdint

Definition at line 358 of file PKPUserDAO.inc.php.

References DAO\update().

Referenced by deleteObject().

& PKPUserDAO::getById (   $userId,
  $allowDisabled = true 
)

Retrieve a user by ID.

Parameters
$userIdint
$allowDisabledboolean
Returns
User

Definition at line 44 of file PKPUserDAO.inc.php.

References DAO\retrieve().

& PKPUserDAO::getByUsername (   $username,
  $allowDisabled = true 
)

Retrieve a user by username.

Parameters
$usernamestring
$allowDisabledboolean
Returns
User

Definition at line 71 of file PKPUserDAO.inc.php.

References DAO\retrieve().

PKPUserDAO::getGenderOptions ( )

Return a list of gender names for use in the user profile.

Returns
array

Definition at line 559 of file PKPUserDAO.inc.php.

PKPUserDAO::getInsertUserId ( )

Get the ID of the last inserted user.

Returns
int

Definition at line 551 of file PKPUserDAO.inc.php.

References DAO\getInsertId().

Referenced by insertUser().

& PKPUserDAO::getUserByAuthStr (   $authstr,
  $allowDisabled = true 
)

Get the user by the TDL ID (implicit authentication).

Parameters
$authstrstring
$allowDisabledboolean
Returns
object User

Definition at line 98 of file PKPUserDAO.inc.php.

References DAO\retrieve().

& PKPUserDAO::getUserByCredentials (   $username,
  $password,
  $allowDisabled = true 
)

Retrieve a user by username and (encrypted) password.

Parameters
$usernamestring
$passwordstring encrypted password
$allowDisabledboolean
Returns
User

Definition at line 141 of file PKPUserDAO.inc.php.

References DAO\retrieve().

& PKPUserDAO::getUserByEmail (   $email,
  $allowDisabled = true 
)

Retrieve a user by email address.

Parameters
$emailstring
$allowDisabledboolean
Returns
User

Definition at line 119 of file PKPUserDAO.inc.php.

References DAO\retrieve().

PKPUserDAO::getUserEmail (   $userId,
  $allowDisabled = true 
)

Retrieve a user's email address.

Parameters
int$userId
$allowDisabledboolean
Returns
string

Definition at line 393 of file PKPUserDAO.inc.php.

References DAO\retrieve().

PKPUserDAO::getUserFullName (   $userId,
  $allowDisabled = true 
)

Retrieve a user's name.

Parameters
int$userId
$allowDisabledboolean
Returns
string

Definition at line 369 of file PKPUserDAO.inc.php.

References DAO\retrieve().

& PKPUserDAO::getUsersByField (   $field = USER_FIELD_NONE,
  $match = null,
  $value = null,
  $allowDisabled = true,
  $dbResultRange = null,
  $sortBy = null,
  $sortDirection = SORT_DIRECTION_ASC 
)

Retrieve an array of users matching a particular field value.

Parameters
$fieldstring the field to match on
$matchstring "is" for exact match, otherwise assume "like" match
$valuemixed the value to match
$allowDisabledboolean
$dbResultRangeobject The desired range of results to return
Returns
array matching Users

Definition at line 421 of file PKPUserDAO.inc.php.

References DAORegistry\getDAO(), DAO\getDirectionMapping(), and DAO\retrieveRange().

& PKPUserDAO::getUsersWithNoRole (   $allowDisabled = true,
  $dbResultRange = null 
)

Retrieve an array of users with no role defined.

Parameters
$allowDisabledboolean
$dbResultRangeobject The desired range of results to return
Returns
array matching Users

Definition at line 477 of file PKPUserDAO.inc.php.

References DAO\retrieveRange().

PKPUserDAO::insertUser ( $user)

Insert a new user.

Parameters
$userUser

Definition at line 211 of file PKPUserDAO.inc.php.

References DAO\datetimeToDB(), Core\getCurrentDate(), getInsertUserId(), and DAO\update().

PKPUserDAO::PKPUserDAO ( )

Constructor

Definition at line 34 of file PKPUserDAO.inc.php.

PKPUserDAO::updateObject ( $user)

Update an existing user.

Parameters
$userUser

Definition at line 270 of file PKPUserDAO.inc.php.

References DAO\datetimeToDB(), Core\getCurrentDate(), and DAO\update().

PKPUserDAO::userExistsByEmail (   $email,
  $userId = null,
  $allowDisabled = true 
)

Check if a user exists with the specified email address.

Parameters
$emailstring
$userIdint optional, ignore matches with this user ID
$allowDisabledboolean
Returns
boolean

Definition at line 534 of file PKPUserDAO.inc.php.

References DAO\retrieve().

PKPUserDAO::userExistsById (   $userId,
  $allowDisabled = true 
)

Check if a user exists with the specified user ID.

Parameters
$userIdint
$allowDisabledboolean
Returns
boolean

Definition at line 494 of file PKPUserDAO.inc.php.

References DAO\retrieve().

PKPUserDAO::userExistsByUsername (   $username,
  $userId = null,
  $allowDisabled = true 
)

Check if a user exists with the specified username.

Parameters
$usernamestring
$userIdint optional, ignore matches with this user ID
$allowDisabledboolean
Returns
boolean

Definition at line 514 of file PKPUserDAO.inc.php.

References DAO\retrieve().


The documentation for this class was generated from the following file: