Commit 4314b03a authored by Zohten's avatar Zohten

simplified

parent dba1827f
...@@ -6,7 +6,7 @@ class User extends Model ...@@ -6,7 +6,7 @@ class User extends Model
// =========== // ===========
// = Statics = // = Statics =
// =========== // ===========
protected static $table_name = 'USER'; protected static $table_name = 'MJ_USER';
// load all users from Db // load all users from Db
public static function getList() public static function getList()
...@@ -28,7 +28,7 @@ class User extends Model ...@@ -28,7 +28,7 @@ class User extends Model
public static function tryLogin($login) public static function tryLogin($login)
{ {
$stm = parent::exec('USER_GET_WITH_LOGIN', ['login' => $login]); $stm = parent::exec('USER_GET_WITH_LOGIN', ['login' => $login]);
return $stm->fetchAll(PDO::FETCH_CLASS, 'User')[0]; return $stm->fetch();
} }
public function id() public function id()
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment