Username = FormatStringForDatabaseInput($this->Username, 1); $this->Password = FormatStringForDatabaseInput($this->Password, 1); } function FormatPropertiesForDisplay() { $this->Username = FormatStringForDisplay($this->Username, 1); $this->Password = ''; } function GetPropertiesFromForm($FormElementPrefix = '') { $this->Username = ForceIncomingString($FormElementPrefix.'Username', ''); $this->Password = ForceIncomingString($FormElementPrefix.'Password', ''); } function SignInManager(&$Context) { $this->Context = &$Context; } function ValidateCredentials() { // Check for an already active session if ($this->Context->Session->UserID != 0) { return true; } else { $this->FormatPropertiesForDatabaseInput(); // Attempt to create a new session for the user $UserManager = $this->Context->ObjectFactory->NewContextObject($this->Context, 'UserManager'); return $UserManager->ValidateUserCredentials($this->Username, $this->Password); } } } ?>