Changeset 893 for trunk/Modules/User/Registration.php
- Timestamp:
- Mar 6, 2023, 1:48:45 AM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/User/Registration.php
r888 r893 86 86 function CheckRegistration() 87 87 { 88 global $Config;89 90 88 $Output = ''; 89 $User = ModuleUser::Cast($this->System->GetModule('User'))->User; 91 90 $ShowForm = true; 92 91 … … 114 113 if (($UserName != '') and ($Pass != '') and ($Pass2 != '')) 115 114 { 116 if (!in_array(strtolower($UserName), $Config['ForbiddedUserNames']))115 if (!in_array(strtolower($UserName), Core::Cast($this->System)->Config['ForbiddedUserNames'])) 117 116 { 118 117 if ($Pass == $Pass2) … … 121 120 $Line = $DbResult->fetch_row(); 122 121 if (!$Line) 123 { 122 { 124 123 if ($Team == 0) $Team = 'NULL'; 125 $ this->System->User->Register($UserName, $Pass, $Email, $Language, $Team, $PreferredVersion);124 $User->Register($UserName, $Pass, $Email, $Language, $Team, $PreferredVersion); 126 125 $Output .= ShowMessage(T('Registration was successful')); 127 126 $Output .= 'Přečtěte si pozorně <a href="'.$this->System->Link('/info/').'">pokyny pro překladání</a> a můžete pak hned začít překládat.'; 128 $ this->System->User->Login($UserName, $Pass);127 $User->Login($UserName, $Pass); 129 128 $this->System->ModuleManager->Modules['Log']->WriteLog('Uživatel se zaregistroval: '.$UserName, LOG_TYPE_USER); 130 129 $ShowForm = false; … … 136 135 if (array_key_exists('Tag'.$UserTag['ID'], $_POST)) { 137 136 $Query = 'SELECT * FROM `UserTag` '. 138 'WHERE `UserTagType` = '.$UserTag['ID'].' AND `User` = '.($ this->System->User->Id * 1);137 'WHERE `UserTagType` = '.$UserTag['ID'].' AND `User` = '.($User->Id * 1); 139 138 $DbResult2 = $this->Database->query($Query); 140 139 if ($DbResult2->num_rows == 0) { 141 140 $Query = 'INSERT INTO `UserTag` (`ID` ,`UserTagType`,`User` ) '. 142 'VALUES (NULL, '.$UserTag['ID'].' , '.($ this->System->User->Id * 1).')';141 'VALUES (NULL, '.$UserTag['ID'].' , '.($User->Id * 1).')'; 143 142 $DbResult2 = $this->Database->query($Query); 144 143 } 145 144 } else { 146 145 $Query = 'DELETE FROM `UserTag` '. 147 'WHERE `UserTagType` = '.$UserTag['ID'].' AND `User` = '.($ this->System->User->Id * 1);146 'WHERE `UserTagType` = '.$UserTag['ID'].' AND `User` = '.($User->Id * 1); 148 147 $DbResult2 = $this->Database->query($Query); 149 148 }
Note:
See TracChangeset
for help on using the changeset viewer.