Changeset 895 for trunk/Modules/User
- Timestamp:
- Jan 12, 2021, 10:29:50 PM (4 years ago)
- Location:
- trunk/Modules/User
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/User/User.php
r894 r895 29 29 } 30 30 31 function DoInstall(): void 32 { 33 $this->Database->insert('PermissionGroup', array('Id' => 1, 'Description' => 'Ostatní')); 34 $this->Database->insert('PermissionGroup', array('Id' => 2, 'Description' => 'Registrovaní uživatelé')); 35 $this->Database->insert('PermissionGroup', array('Id' => 3, 'Description' => 'Zákazníci')); 36 $this->Database->insert('PermissionGroup', array('Id' => 4, 'Description' => 'Správci sítě')); 37 $this->Database->insert('PermissionGroup', array('Id' => 5, 'Description' => 'Systémoví správci')); 38 } 39 31 40 function DoStart(): void 32 41 { … … 181 190 $Output = 'Uživatelů: '.$DbRow['0'].'<br/>'; 182 191 return $Output; 183 }184 185 function DoStop(): void186 {187 192 } 188 193 -
trunk/Modules/User/UserModel.php
r894 r895 75 75 $Desc->AddString('Salt'); 76 76 $Desc->AddString('Email'); 77 $Desc->AddString('LastIpAddress'); 78 $Desc->AddString('LastLoginTime'); 77 $Column = $Desc->AddString('LastIpAddress'); 78 $Column->HasDefault = true; 79 $Column->Nullable = true; 80 $Column = $Desc->AddDateTime('LastLoginTime'); 81 $Column->Nullable = true; 82 $Column->HasDefault = true; 79 83 $Desc->AddDateTime('RegistrationTime'); 80 84 $Desc->AddBoolean('Locked'); 81 $Desc->AddString('InitPassword'); 85 $Column = $Desc->AddString('InitPassword'); 86 $Column->Nullable = true; 87 $Column->HasDefault = true; 82 88 return $Desc; 83 89 } … … 118 124 if ($Row['User'] != '') 119 125 { 120 $Query = $this->Database->query('SELECT `User`.*, `UserCustomerRel`.`Customer` AS `Member` FROM `User` '. 121 ' LEFT JOIN `UserCustomerRel` ON `UserCustomerRel`.`User`=`User`.`Id` WHERE `User`.`Id`='.$Row['User']); 126 $Query = $this->Database->query('SELECT `User`.* FROM `User` WHERE `User`.`Id`='.$Row['User']); 122 127 $this->User = $Query->fetch_assoc(); 123 128 $Result = USER_LOGGED; … … 500 505 { 501 506 $Desc = new ModelDesc(self::GetClassName()); 502 $Desc->AddReference('Module', Module::GetClassName());507 //$Desc->AddReference('Module', Module::GetClassName()); 503 508 $Desc->AddString('Operation'); 504 509 $Desc->AddString('Item'); -
trunk/Modules/User/UserPage.php
r887 r895 21 21 function ShowContacts(): string 22 22 { 23 if (!$this->System->ModuleManager->ModuleRunning('Subject')) return ''; 24 23 25 $Query = 'SELECT `Contact`.`Value`, `Contact`.`Description`, (SELECT `Name` FROM `ContactCategory` WHERE `ContactCategory`.`Id` = `Contact`.`Category`) AS `Category` '. 24 26 'FROM `Contact` WHERE `User` = '. … … 39 41 $Order = GetOrderTableHeader('Contacts', $TableColumns, 'Value', 0); 40 42 $Output .= $Order['Output']; 41 42 43 $Query = $Query.' '.$Order['SQL'].$PageList['SQLLimit']; 43 44 44 $DbResult = $this->Database->query($Query); 45 45 while ($Contact = $DbResult->fetch_assoc()) … … 49 49 '<td>'.$Contact['Value'].'</td>'. 50 50 '<td>'.$Contact['Description'].'</td>'. 51 '</tr>';51 '</tr>'; 52 52 } 53 53 $Output .= '</table>';
Note:
See TracChangeset
for help on using the changeset viewer.