VuFind API Documentation

UserServiceInterface extends DbServiceInterface

Database service interface for users.

Tags
category

VuFind

author

Aleksi Peebles aleksi.peebles@helsinki.fi

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Wiki

Table of Contents

createEntity()  : UserEntityInterface
Create a new user entity.
createEntityForUsername()  : UserEntityInterface
Create an entity for the specified username.
deleteUser()  : void
Delete a user entity.
getAllUsersWithCatUsernames()  : array<string|int, UserEntityInterface>
Get all rows with catalog usernames.
getInsecureRows()  : array<string|int, UserEntityInterface>
Get user rows with insecure catalog passwords.
getUserByCatId()  : UserEntityInterface|null
Retrieve a user object by catalog ID. Returns null if no match is found.
getUserByEmail()  : UserEntityInterface|null
Retrieve a user object by email address. Returns null if no match is found.
getUserByField()  : UserEntityInterface|null
Retrieve a user object from the database based on the given field.
getUserById()  : UserEntityInterface|null
Retrieve a user object from the database based on ID.
getUserByUsername()  : UserEntityInterface|null
Retrieve a user object by username. Returns null if no match is found.
getUserByVerifyHash()  : UserEntityInterface|null
Retrieve a user object by verify hash. Returns null if no match is found.
persistEntity()  : void
Persist an entity.
updateUserEmail()  : void
Update the user's email address, if appropriate. Note that this does NOT automatically save the row; it assumes a subsequent call will be made to persist the data.

Methods

getUserByField()

Retrieve a user object from the database based on the given field.

public getUserByField(string $fieldName, int|string|null $fieldValue) : UserEntityInterface|null

Field name must be id, username, email, verify_hash or cat_id.

Parameters
$fieldName : string

Field name

$fieldValue : int|string|null

Field value

Return values
UserEntityInterface|null

updateUserEmail()

Update the user's email address, if appropriate. Note that this does NOT automatically save the row; it assumes a subsequent call will be made to persist the data.

public updateUserEmail(UserEntityInterface $user, string $email[, bool $userProvided = false ]) : void
Parameters
$user : UserEntityInterface

User entity to update

$email : string

New email address

$userProvided : bool = false

Was this email provided by the user (true) or an automated lookup (false)?

Return values
void

Search results