Changeset 880 for trunk/Modules/User/Options.php
- Timestamp:
- Apr 7, 2020, 10:15:48 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/User/Options.php
r861 r880 17 17 '<option value="0">'.T('Nowhere').'</option>'. 18 18 '<option value="1"'; 19 if ($this->System->User->Redirecting == '1') $Output .= ' selected="selected"';19 if ($this->System->User->Redirecting == '1') $Output .= ' selected="selected"'; 20 20 $Output .= '>'.T('To untranslated').'</option>'; 21 21 $Output .= '<option value="2"'; 22 if ($this->System->User->Redirecting == '2') $Output .= ' selected="selected"';22 if ($this->System->User->Redirecting == '2') $Output .= ' selected="selected"'; 23 23 $Output .= '>'.T('To next translation').'</option>'; 24 24 $Output .= '<option value="3"'; 25 if ($this->System->User->Redirecting == '3') $Output .= ' selected="selected"';25 if ($this->System->User->Redirecting == '3') $Output .= ' selected="selected"'; 26 26 $Output .= '>'.T('To previous translation').'</option>'; 27 27 $Output .= '</select>'; … … 60 60 '<input type="hidden" name="action" value="gointeam"/>'. 61 61 '<select name="id">'; 62 while ($LineTeam = $DbResult->fetch_assoc())62 while ($LineTeam = $DbResult->fetch_assoc()) 63 63 { 64 64 $Output .= '<option value="'.$LineTeam['Id'].'"'; … … 69 69 </form>'; 70 70 $Output .= '</fieldset>'; 71 return ($Output);71 return $Output; 72 72 } 73 73 … … 75 75 { 76 76 $Output = ''; 77 if (array_key_exists('Email', $_POST))77 if (array_key_exists('Email', $_POST)) 78 78 { 79 79 $Email = $_POST['Email']; … … 84 84 $Redirecting = $_POST['redirecting']; 85 85 $PreferredVersion = $_POST['ClientVersion']; 86 if ($PreferredVersion == '') $PreferredVersion = null;86 if ($PreferredVersion == '') $PreferredVersion = null; 87 87 $Info = $_POST['info']; 88 88 89 89 // Do user want to change password? 90 if (($OldPass != '') or ($NewPass != '') or ($NewPass2 != ''))90 if (($OldPass != '') or ($NewPass != '') or ($NewPass2 != '')) 91 91 { 92 if ($NewPass == $NewPass2)92 if ($NewPass == $NewPass2) 93 93 { 94 94 $DbResult = $this->System->Database->query('SELECT `Pass`, '.$this->System->User->CryptPasswordSQL('"'.$OldPass.'"', '`Salt`').' AS `Hash` FROM `User` WHERE `ID`= '.$this->System->User->Id); 95 95 $DbRow = $DbResult->fetch_assoc(); 96 if ($DbRow['Hash'] == $DbRow['Pass'])96 if ($DbRow['Hash'] == $DbRow['Pass']) 97 97 { 98 98 // Update password … … 130 130 $this->System->User->Load(); 131 131 } else $Output .= ShowMessage('Nezadány údaje.', MESSAGE_CRITICAL); 132 return ($Output);132 return $Output; 133 133 } 134 134 … … 137 137 $this->Title = T('User settings'); 138 138 $Output = ''; 139 if ($this->System->User->Licence(LICENCE_USER))139 if ($this->System->User->Licence(LICENCE_USER)) 140 140 { 141 if (array_key_exists('action', $_GET) and ($_GET['action'] == 'save'))141 if (array_key_exists('action', $_GET) and ($_GET['action'] == 'save')) 142 142 { 143 143 $Output .= $this->UserOptionsSave(); … … 145 145 $Output .= $this->UserOptionsFrom(); 146 146 } else $Output .= ShowMessage('Nejste přihlášený.', MESSAGE_CRITICAL); 147 return ($Output);147 return $Output; 148 148 } 149 149 }
Note:
See TracChangeset
for help on using the changeset viewer.