Changeset 874 for trunk/Modules/User
- Timestamp:
- Apr 6, 2020, 11:56:19 PM (5 years ago)
- Location:
- trunk/Modules/User
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/User/User.php
r873 r874 301 301 // <a href="'.$this->System->Link('/?Action=UserOptions').'">Nastavení</a>'; 302 302 } 303 return ($Output);303 return $Output; 304 304 } 305 305 } -
trunk/Modules/User/UserList.php
r873 r874 10 10 { 11 11 if (!$this->System->User->CheckPermission('User', 'ShowList')) 12 return ('Nemáte oprávnění');12 return 'Nemáte oprávnění'; 13 13 14 14 $DbResult = $this->Database->query('SELECT COUNT(*) FROM `User`'); … … 52 52 $Output .= $PageList['Output']; 53 53 54 return ($Output);54 return $Output; 55 55 } 56 56 } -
trunk/Modules/User/UserModel.php
r873 r874 30 30 function Hash($Password, $Salt) 31 31 { 32 return (sha1(sha1($Password).$Salt));32 return sha1(sha1($Password).$Salt); 33 33 } 34 34 35 35 function Verify($Password, $Salt, $StoredHash) 36 36 { 37 return ($this->Hash($Password, $Salt) == $StoredHash);37 return $this->Hash($Password, $Salt) == $StoredHash; 38 38 } 39 39 … … 177 177 } 178 178 } 179 return ($Result);179 return $Result; 180 180 } 181 181 … … 195 195 } else $Output = PASSWORDS_UNMATCHED; 196 196 } else $Output = USER_NOT_FOUND; 197 return ($Output);197 return $Output; 198 198 } 199 199 … … 231 231 } 232 232 } else $Result = USER_NOT_REGISTRED; 233 return ($Result);233 return $Result; 234 234 } 235 235 … … 240 240 $this->System->ModuleManager->Modules['Log']->NewRecord('User', 'Logout', $this->User['Login']); 241 241 $this->Check(); 242 return (USER_LOGGED_OUT);242 return USER_LOGGED_OUT; 243 243 } 244 244 … … 271 271 $Result[$DbRow['Description']][$DbRow['Title']] = $Value; 272 272 } 273 return ($Result);273 return $Result; 274 274 } 275 275 … … 296 296 { 297 297 if ($DbRow['AssignedGroup'] != '') 298 if ($this->CheckGroupPermission($DbRow['AssignedGroup'], $OperationId) == true) return (true);298 if ($this->CheckGroupPermission($DbRow['AssignedGroup'], $OperationId) == true) return true; 299 299 } 300 300 } … … 314 314 if ($PermissionExists) 315 315 { 316 return ($this->PermissionGroupCacheOp[$GroupId.','.$OperationId]);317 } 318 return (false);316 return $this->PermissionGroupCacheOp[$GroupId.','.$OperationId]; 317 } 318 return false; 319 319 } 320 320 … … 327 327 $DbRow = $DbResult->fetch_assoc(); 328 328 $ModuleId = $DbRow['Id']; 329 } else return (false);329 } else return false; 330 330 331 331 // First try to check cache … … 358 358 // Check user-operation relation 359 359 $DbResult = $this->Database->select('PermissionUserAssignment', '*', $UserCondition.' AND (`AssignedOperation`="'.$OperationId.'")'); 360 if ($DbResult->num_rows > 0) return (true);360 if ($DbResult->num_rows > 0) return true; 361 361 362 362 // Check user-group relation … … 364 364 while ($DbRow = $DbResult->fetch_array()) 365 365 { 366 if ($this->CheckGroupPermission($DbRow['AssignedGroup'], $OperationId) == true) return (true);367 } 368 return (false);369 } else return (false);366 if ($this->CheckGroupPermission($DbRow['AssignedGroup'], $OperationId) == true) return true; 367 } 368 return false; 369 } else return false; 370 370 } 371 371 … … 394 394 $this->System->ModuleManager->Modules['Log']->NewRecord('User', 'PasswordRecoveryRequest', 'Login='.$Login.',Email='.$Email); 395 395 } else $Output = USER_PASSWORD_RECOVERY_FAIL; 396 return ($Output);396 return $Output; 397 397 } 398 398 … … 414 414 } else $Output = PASSWORDS_UNMATCHED; 415 415 } else $Output = USER_NOT_FOUND; 416 return ($Output);416 return $Output; 417 417 } 418 418 … … 425 425 $User = new User($this->System); 426 426 $User->User = array('Id' => $DbRow['User']); 427 return ($User->CheckPermission($Module, $Operation));428 } else return (false);427 return $User->CheckPermission($Module, $Operation); 428 } else return false; 429 429 } 430 430 } -
trunk/Modules/User/UserPage.php
r873 r874 12 12 foreach ($Menu as $Item) 13 13 $Title .= '<div class="Action">'.$Item.'</div>'; 14 return ('<div class="Panel"><div class="Title">'.$Title.'</div><div class="Content">'.$Content.'</div></div>');14 return '<div class="Panel"><div class="Title">'.$Title.'</div><div class="Content">'.$Content.'</div></div>'; 15 15 } 16 16 … … 50 50 $Output .= $PageList['Output']; 51 51 52 return ($Output);52 return $Output; 53 53 } 54 54 … … 85 85 $Output .= '</td></tr></table></div>'; 86 86 } else $Output .= $this->SystemMessage('Oprávnění', 'Nejste přihlášen'); 87 return ($Output);87 return $Output; 88 88 } 89 89 … … 213 213 } else $Output = $this->ShowMain(); 214 214 } else $Output = $this->ShowMain(); 215 return ($Output);215 return $Output; 216 216 } 217 217 … … 219 219 { 220 220 $Output = 'Nebyla vybrána akce'; 221 return ($Output);221 return $Output; 222 222 } 223 223 }
Note:
See TracChangeset
for help on using the changeset viewer.