6 use Elgg\Traits\TimeUsing;
51 return $this->database->insertData($insert);
62 $select =
Select::fromTable(self::TABLE_NAME);
66 return $this->database->getDataRow($select) ?:
null;
78 $update =
Update::table(self::TABLE_NAME);
79 $update->set(
'timestamp', $update->param($this->getCurrentTime()->getTimestamp(),
ELGG_VALUE_TIMESTAMP))
84 return $this->database->updateData($update);
98 return $this->database->deleteData(
$delete);
112 return $this->database->deleteData(
$delete);
126 return $this->database->deleteData(
$delete);
Query builder for updating data in the database.
static intoTable(string $table)
Returns a QueryBuilder for inserting data in a given table.
Query builder for fetching data from the database.
Query builder for updating data in the database.
Manage the users_remember_me_cookies table.
insertHash(\ElggUser $user, string $hash)
Store a hash in the DB.
__construct(protected Database $database)
Create a new service.
deleteHash(string $hash)
Remove a hash from the DB.
getRowFromHash(string $hash)
Get the database row for a hash.
deleteAllHashes(\ElggUser $user)
Remove all the hashes associated with a user.
deleteExpiredHashes(int $expiration)
Remove all expired hashes from the database.
updateHash(\ElggUser $user, string $hash)
Update the timestamp of a used hash.
const ELGG_VALUE_TIMESTAMP