diff --git a/classes/User.php b/classes/User.php index 7035f1a..9b96d80 100644 --- a/classes/User.php +++ b/classes/User.php @@ -1,11 +1,10 @@ username, $user -> username) === 0) && (strcasecmp($this -> sha1_pass, $user -> sha1_pass) === 0)); + return ((strcasecmp($this->username, $user->username) === 0) && (strcasecmp($this->sha1_pass, $user->sha1_pass) === 0)); } /** @@ -92,21 +91,27 @@ class User $str = ''; if (USE_LOGIN_SYSTEM) { - global $words, $subdir; - $str .= '
' - . $words -> __get('username') . ':' - . '
' . $words -> __get('password') - . ':
' - . '

'; + global $words, $subdir, $request; + $str .= ' +
+ + + + + + + + + +
' . $words->__get('username') . ':' . '
' . $words->__get('password') . ':
' + . '

'; } if (LEVEL_TO_UPLOAD === GUEST) { global $you; $upload_panel = new Upload($you); - $str .= $upload_panel -> __toString(); + $str .= $upload_panel->__toString(); } return $str; } @@ -128,10 +133,10 @@ class User { throw new ExceptionDisplay('Error in user accounts file: Invalid password hash (for username "' . Url::html_output($username) . '").'); } - $this -> sha1_pass = $sha1_pass; - $this -> username = $username; - $this -> level = $level; - $this -> home_dir = $home_dir; + $this->sha1_pass = $sha1_pass; + $this->username = $username; + $this->level = $level; + $this->home_dir = $home_dir; } /** @@ -139,9 +144,8 @@ class User */ public function __toString() { - return $this -> username . "\t" . $this -> sha1_pass . "\t" - . $this -> level . "\t" . $this -> home_dir . "\n"; + return $this->username . "\t" . $this->sha1_pass . "\t" . $this->level . "\t" . $this->home_dir . "\n"; } } -?> \ No newline at end of file +?>