19 declare(strict_types=1);
27 protected \ilDBInterface
$db;
36 $this->db->manipulate(
39 $this->db->manipulate(
46 if (!$this->db->tableColumnExists(ChangeMailTokenDBRepository::TABLE_NAME,
'usr_id')) {
47 $this->db->addTableColumn(
48 ChangeMailTokenDBRepository::TABLE_NAME,
57 if (!$this->db->tableColumnExists(ChangeMailTokenDBRepository::TABLE_NAME,
'status')) {
58 $this->db->addTableColumn(
59 ChangeMailTokenDBRepository::TABLE_NAME,
68 if ($this->db->tableColumnExists(ChangeMailTokenDBRepository::TABLE_NAME,
'valid_until')) {
69 $this->db->renameTableColumn(
70 ChangeMailTokenDBRepository::TABLE_NAME,
75 if (!$this->db->primaryExistsByFields(ChangeMailTokenDBRepository::TABLE_NAME, [
'token'])) {
76 $this->db->manipulate(
'DELETE token1 FROM ' . ChangeMailTokenDBRepository::TABLE_NAME .
' token1 ' 77 .
'INNER JOIN ' . ChangeMailTokenDBRepository::TABLE_NAME .
' token2 ' 78 .
'WHERE token1.token = token2.token AND token1.created_ts < token2.created_ts');
79 $this->db->addPrimaryKey(ChangeMailTokenDBRepository::TABLE_NAME, [
'token']);
85 $query =
'SELECT * FROM settings WHERE module = %s AND keyword = %s';
86 $result = $this->db->queryF(
89 [
'common',
'session_reminder_enabled']
91 $session_reminder = $result->numRows() ? (bool) $this->db->fetchAssoc($result)[
'value'] :
false;
92 $query =
'SELECT * FROM settings WHERE module = %s AND keyword = %s';
93 $result = $this->db->queryF(
96 [
'common',
'session_reminder_lead_time']
98 $session_reminder_lead_time = $result->numRows() ? (
int) $this->db->fetchAssoc($result)[
'value'] :
null;
99 if ($session_reminder && !isset($session_reminder_lead_time)) {
100 $query =
'INSERT INTO settings (module, keyword, value) VALUES (%s, %s, %s)';
101 $this->db->manipulateF(
107 $query =
'DELETE FROM settings WHERE module = %s AND keyword = %s';
108 $this->db->manipulateF(
111 [
'common',
'session_reminder_enabled']
113 $query =
'DELETE FROM usr_pref WHERE keyword = %s';
114 $this->db->manipulateF(
117 [
'session_reminder_enabled']
123 $query =
'SELECT value FROM settings WHERE module = %s AND keyword = %s';
124 $res = $this->db->queryF(
127 [
'common',
'ps_login_max_attempts']
131 $max_login_attempts = min(
136 $max_login_attempts_exceeded = $max_login_attempts + 1;
138 $this->db->manipulateF(
139 'UPDATE usr_data SET login_attempts = %s WHERE login_attempts > %s',
141 [$max_login_attempts_exceeded, $max_login_attempts_exceeded]
147 if ($this->db->tableColumnExists(
'personal_clipboard',
'title')) {
148 $this->db->modifyTableColumn(
'personal_clipboard',
'title', [
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const SUGGESTED_LEAD_TIME
prepare(\ilDBInterface $db)
Prepare the execution of the steps.