public static function post() { if ($user = \lib\user::authenticate($_POST['username'], $_POST['password'])) { $_SESSION['user_id'] = $user['id']; return true; } else { return false; } }