forked from wallabag/wallabag
working on registration support
This commit is contained in:
@ -67,6 +67,12 @@ class Routing
|
||||
$this->wallabag->action($this->action, $this->url, $this->id);
|
||||
$tplFile = Tools::getTplFile($this->view);
|
||||
$tplVars = array_merge($this->vars, $this->wallabag->displayView($this->view, $this->id));
|
||||
} elseif(ALLOW_REGISTER && isset($_GET['registerform'])) {
|
||||
Tools::logm('register');
|
||||
$tplFile = Tools::getTplFile('register');
|
||||
} elseif (ALLOW_REGISTER && isset($_GET['register'])){
|
||||
$this->wallabag->createNewUser($_POST['newusername'], $_POST['password4newuser']);
|
||||
Tools::redirect();
|
||||
} elseif(isset($_SERVER['PHP_AUTH_USER'])) {
|
||||
if($this->wallabag->store->userExists($_SERVER['PHP_AUTH_USER'])) {
|
||||
$this->wallabag->login($this->referer);
|
||||
@ -104,7 +110,9 @@ class Routing
|
||||
$tag_id = (isset($_GET['tag_id']) ? intval($_GET['tag_id']) : 0);
|
||||
$limit = (isset($_GET['limit']) ? intval($_GET['limit']) : 0);
|
||||
$this->wallabag->generateFeeds($_GET['token'], filter_var($_GET['user_id'],FILTER_SANITIZE_NUMBER_INT), $tag_id, $_GET['type'], $limit);
|
||||
}
|
||||
} //elseif (ALLOW_REGISTER && isset($_GET['register'])) {
|
||||
//$this->wallabag->register
|
||||
//}
|
||||
|
||||
//allowed ONLY to logged in user
|
||||
if (\Session::isLogged() === true)
|
||||
|
||||
Reference in New Issue
Block a user