浏览代码

Better error-messages at login

Moritz Schmidt 10 年之前
父节点
当前提交
fd74657746
共有 1 个文件被更改,包括 2 次插入14 次删除
  1. 2 14
      includes/user.inc.php

+ 2 - 14
includes/user.inc.php

@@ -43,7 +43,7 @@ Class User {
 		}
 
 		if(sizeof($user) < 1) {
-			die('Something really went wrong.');
+			die('No such user.');
 		}
 
 		if($user[0]->password === md5($password)) {
@@ -67,7 +67,7 @@ Class User {
 		}
 
 		if(sizeof($user) < 1) {
-			die('Something really went wrong.');
+			die('No such user.');
 		}
 
 		$_SESSION['loggedIn'] = true;
@@ -87,18 +87,6 @@ Class User {
 		header("Location: http://atoffice");
 	}
 
-	public function getClients() {
-		global $db;
-
-		//$clients = $db->query("SELECT * FROM `clients` WHERE `owned_by` = '" . $this->username . "'");
-
-		//sizeof($clients);
-
-		//return $clients->name;
-
-		return $this->username;
-	}
-
 }
 
 ?>