Changeset 6 for trunk/Modules/User
- Timestamp:
- Apr 14, 2020, 11:06:28 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/User/UserModel.php
r5 r6 119 119 { 120 120 $this->Database->delete('UserOnline', 'Id='.$DbRow['Id']); 121 if($DbRow['User'] != null) $this->System->ModuleManager->Modules['Log']->NewRecord('User', 'Logout'); 121 if(($DbRow['User'] != null) and $this->System->ModuleManager->ModulePresent('Log')) 122 $this->System->ModuleManager->Modules['Log']->NewRecord('User', 'Logout'); 122 123 } 123 124 //$this->LoadPermission($this->User['Role']); … … 174 175 175 176 $Result = USER_REGISTRATED; 176 if( array_key_exists('Log', $this->System->ModuleManager->Modules))177 if($this->System->ModuleManager->ModulePresent('Log')) 177 178 $this->System->ModuleManager->Modules['Log']->NewRecord('User', 'NewRegistration', $Login); 178 179 } … … 194 195 $this->Database->update('User', 'Id='.$Row['Id'], array('Locked' => 0)); 195 196 $Output = USER_REGISTRATION_CONFIRMED; 196 $this->System->ModuleManager->Modules['Log']->NewRecord('User', 'RegisterConfirm', 'Login='. 197 $Row['Login'].', Id='.$Row['Id']); 197 if($this->System->ModuleManager->ModulePresent('Log')) 198 $this->System->ModuleManager->Modules['Log']->NewRecord('User', 'RegisterConfirm', 'Login='. 199 $Row['Login'].', Id='.$Row['Id']); 198 200 } else $Output = PASSWORDS_UNMATCHED; 199 201 } else $Output = USER_NOT_FOUND; … … 242 244 $SID = session_id(); 243 245 $this->Database->update('UserOnline', 'SessionId="'.$SID.'"', array('User' => null)); 244 if( array_key_exists('Log', $this->System->ModuleManager->Modules))246 if($this->System->ModuleManager->ModulePresent('Log')) 245 247 $this->System->ModuleManager->Modules['Log']->NewRecord('User', 'Logout', $this->User['Login']); 246 248 $this->Check(); … … 397 399 398 400 $Output = USER_PASSWORD_RECOVERY_SUCCESS; 399 $this->System->ModuleManager->Modules['Log']->NewRecord('User', 'PasswordRecoveryRequest', 'Login='.$Login.',Email='.$Email); 401 if($this->System->ModuleManager->ModulePresent('Log')) 402 $this->System->ModuleManager->Modules['Log']->NewRecord('User', 'PasswordRecoveryRequest', 'Login='.$Login.',Email='.$Email); 400 403 } else $Output = USER_PASSWORD_RECOVERY_FAIL; 401 404 return($Output); … … 415 418 $this->Database->update('User', 'Id='.$Row['Id'], array('Password' => $PasswordHash->Hash($NewPassword, $Salt), 416 419 'Salt' => $Salt, 'Locked' => 0)); 417 $Output = USER_PASSWORD_RECOVERY_CONFIRMED;418 $this->System->ModuleManager->Modules['Log']->NewRecord('User', 'PasswordRecoveryConfirm', 'Login='.$Row['Login']);420 if($this->System->ModuleManager->ModulePresent('Log')) 421 $this->System->ModuleManager->Modules['Log']->NewRecord('User', 'PasswordRecoveryConfirm', 'Login='.$Row['Login']); 419 422 } else $Output = PASSWORDS_UNMATCHED; 420 423 } else $Output = USER_NOT_FOUND;
Note:
See TracChangeset
for help on using the changeset viewer.