ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilUserDB90 Class Reference
+ Inheritance diagram for ilUserDB90:
+ Collaboration diagram for ilUserDB90:

Public Member Functions

 prepare (ilDBInterface $db)
 
 step_1 ()
 creates a column "rid" that is used to reference d IRSS Resource for a Profile Picture More...
 
 step_2 ()
 Modifies the 'passwd' field in table 'usr_data' to accept longer passwords. More...
 
 step_3 ()
 
 step_4 ()
 Remove the special charactor selector settings from the user preferences. More...
 
 step_5 ()
 
 step_6 ()
 
 step_7 ()
 
 step_8 ()
 
 step_9 ()
 
 step_10 ()
 
- Public Member Functions inherited from ilDatabaseUpdateSteps
 prepare (\ilDBInterface $db)
 Prepare the execution of the steps. More...
 

Protected Attributes

ilDBInterface $db
 

Private Attributes

const USER_DATA_TABLE_NAME = 'usr_data'
 

Detailed Description

Author
Fabian Schmid fabia.nosp@m.n@sr.nosp@m..solu.nosp@m.tion.nosp@m.s

Definition at line 28 of file class.ilUserDB90.php.

Member Function Documentation

◆ prepare()

ilUserDB90::prepare ( ilDBInterface  $db)

Definition at line 34 of file class.ilUserDB90.php.

References $db.

34  : void
35  {
36  $this->db = $db;
37  }
ilDBInterface $db

◆ step_1()

ilUserDB90::step_1 ( )

creates a column "rid" that is used to reference d IRSS Resource for a Profile Picture

Definition at line 43 of file class.ilUserDB90.php.

43  : void
44  {
45  if (!$this->db->tableColumnExists(self::USER_DATA_TABLE_NAME, 'rid')) {
46  $this->db->addTableColumn(
47  'usr_data',
48  'rid',
49  [
50  'type' => 'text',
51  'notnull' => false,
52  'length' => 64,
53  'default' => ''
54  ]
55  );
56  }
57  }

◆ step_10()

ilUserDB90::step_10 ( )

Definition at line 124 of file class.ilUserDB90.php.

References $res, ilSecuritySettings\MAX_LOGIN_ATTEMPTS, ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.

124  : void
125  {
126  $query = 'SELECT value FROM settings WHERE module = %s AND keyword = %s';
127  $res = $this->db->queryF(
128  $query,
130  ['common', 'ps_login_max_attempts']
131  );
132 
133  // We should adjust the usr_data values, even if the "Max. Login Attempts" are currently not set
134  $max_login_attempts = min(
135  (int) ($this->db->fetchAssoc($res)['value'] ?? ilSecuritySettings::MAX_LOGIN_ATTEMPTS),
137  );
138 
139  $max_login_attempts_exceeded = $max_login_attempts + 1;
140 
141  $this->db->manipulateF(
142  'UPDATE usr_data SET login_attempts = %s WHERE login_attempts > %s',
144  [$max_login_attempts_exceeded, $max_login_attempts_exceeded]
145  );
146  }
$res
Definition: ltiservices.php:69

◆ step_2()

ilUserDB90::step_2 ( )

Modifies the 'passwd' field in table 'usr_data' to accept longer passwords.

Definition at line 62 of file class.ilUserDB90.php.

62  : void
63  {
64  if ($this->db->tableColumnExists(self::USER_DATA_TABLE_NAME, 'passwd')) {
65  $this->db->modifyTableColumn(
66  'usr_data',
67  'passwd',
68  [
69  'type' => 'text',
70  'length' => 100,
71  'notnull' => false,
72  'default' => null
73  ]
74  );
75  }
76  }

◆ step_3()

ilUserDB90::step_3 ( )

Definition at line 78 of file class.ilUserDB90.php.

References ilDBConstants\T_TEXT.

78  : void
79  {
80  $this->db->modifyTableColumn(
81  'usr_sess_istorage',
82  'session_id',
83  [
84  'type' => ilDBConstants::T_TEXT,
85  'length' => '256'
86  ]
87  );
88  }

◆ step_4()

ilUserDB90::step_4 ( )

Remove the special charactor selector settings from the user preferences.

Definition at line 93 of file class.ilUserDB90.php.

93  : void
94  {
95  $this->db->manipulate("DELETE FROM usr_pref WHERE keyword LIKE 'char_selector%'");
96  }

◆ step_5()

ilUserDB90::step_5 ( )

Definition at line 98 of file class.ilUserDB90.php.

98  : void
99  {
100  $query = 'ALTER TABLE ' . self::USER_DATA_TABLE_NAME . ' MODIFY firstname VARCHAR(128);';
101  $this->db->manipulate($query);
102  }

◆ step_6()

ilUserDB90::step_6 ( )

Definition at line 103 of file class.ilUserDB90.php.

103  : void
104  {
105  $query = 'ALTER TABLE ' . self::USER_DATA_TABLE_NAME . ' MODIFY lastname VARCHAR(128);';
106  $this->db->manipulate($query);
107  }

◆ step_7()

ilUserDB90::step_7 ( )

Definition at line 108 of file class.ilUserDB90.php.

108  : void
109  {
110  $query = 'ALTER TABLE ' . self::USER_DATA_TABLE_NAME . ' MODIFY email VARCHAR(128);';
111  $this->db->manipulate($query);
112  }

◆ step_8()

ilUserDB90::step_8 ( )

Definition at line 113 of file class.ilUserDB90.php.

113  : void
114  {
115  $query = 'DELETE FROM rbac_ta WHERE typ_id=22 AND ops_id=48 ;';
116  $this->db->manipulate($query);
117  }

◆ step_9()

ilUserDB90::step_9 ( )

Definition at line 118 of file class.ilUserDB90.php.

118  : void
119  {
120  $query = 'DELETE FROM settings WHERE module="common" AND keyword="user_adm_alpha_nav";';
121  $this->db->manipulate($query);
122  }

Field Documentation

◆ $db

ilDBInterface ilUserDB90::$db
protected

Definition at line 32 of file class.ilUserDB90.php.

Referenced by prepare().

◆ USER_DATA_TABLE_NAME

const ilUserDB90::USER_DATA_TABLE_NAME = 'usr_data'
private

Definition at line 30 of file class.ilUserDB90.php.


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