Login WIP
This commit is contained in:
@@ -2,28 +2,31 @@
|
||||
|
||||
namespace ppa\Controller;
|
||||
|
||||
use ppa\Model\NotesModel;
|
||||
use ppa\Model\UserModel;
|
||||
use ppa\Library\View;
|
||||
|
||||
class NotesController
|
||||
class UserController
|
||||
{
|
||||
private $notesModel;
|
||||
private $userModel;
|
||||
protected $view;
|
||||
|
||||
public function __construct($view)
|
||||
{
|
||||
$this->notesModel = new NotesModel();
|
||||
$this->userModel = new UserModel();
|
||||
$this->view = $view;
|
||||
}
|
||||
|
||||
public function showNotes()
|
||||
|
||||
public function loginUser()
|
||||
{
|
||||
echo "test";
|
||||
//verifyLogin($_POST['username'] ?? '', $_POST['password'] ?? '')
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function showUserLoginForm()
|
||||
{
|
||||
$sortBy = $_GET['sort_by'] ?? 'updated_at';
|
||||
$sortOrder = strtoupper($_GET['sort_order'] ?? 'DESC');
|
||||
|
||||
$this->view->setVars([
|
||||
"notes" => $this->notesModel->selectNotesForUser(2, $sortBy, $sortOrder) //$_SESSION['user_id']
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user