diff options
author | Thomas Citharel <tcit@tcit.fr> | 2015-02-14 13:46:05 +0100 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2015-02-14 13:46:05 +0100 |
commit | 7780b8cb370625e27894636ecce555c8200b6108 (patch) | |
tree | cd074d771392bfbe84964fa54cfd30d167be663c /inc/poche/Routing.class.php | |
parent | 31556b05d0fc64c6d183d418d2d00f0ea5a0a136 (diff) | |
parent | 952faeeb312e7461e4ca69fb236c14ee780d3fc5 (diff) | |
download | wallabag-7780b8cb370625e27894636ecce555c8200b6108.tar.gz wallabag-7780b8cb370625e27894636ecce555c8200b6108.tar.zst wallabag-7780b8cb370625e27894636ecce555c8200b6108.zip |
Merge pull request #1021 from wallabag/register
working on registration support
Diffstat (limited to 'inc/poche/Routing.class.php')
-rwxr-xr-x | inc/poche/Routing.class.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/inc/poche/Routing.class.php b/inc/poche/Routing.class.php index 82ff20d6..177b74d5 100755 --- a/inc/poche/Routing.class.php +++ b/inc/poche/Routing.class.php | |||
@@ -68,6 +68,12 @@ class Routing | |||
68 | $this->wallabag->action($this->action, $this->url, $this->id, FALSE, $this->autoclose); | 68 | $this->wallabag->action($this->action, $this->url, $this->id, FALSE, $this->autoclose); |
69 | $tplFile = Tools::getTplFile($this->view); | 69 | $tplFile = Tools::getTplFile($this->view); |
70 | $tplVars = array_merge($this->vars, $this->wallabag->displayView($this->view, $this->id)); | 70 | $tplVars = array_merge($this->vars, $this->wallabag->displayView($this->view, $this->id)); |
71 | } elseif(ALLOW_REGISTER && isset($_GET['registerform'])) { | ||
72 | Tools::logm('register'); | ||
73 | $tplFile = Tools::getTplFile('register'); | ||
74 | } elseif (ALLOW_REGISTER && isset($_GET['register'])){ | ||
75 | $this->wallabag->createNewUser($_POST['newusername'], $_POST['password4newuser'], $_POST['newuseremail']); | ||
76 | Tools::redirect(); | ||
71 | } elseif(isset($_SERVER['PHP_AUTH_USER'])) { | 77 | } elseif(isset($_SERVER['PHP_AUTH_USER'])) { |
72 | if($this->wallabag->store->userExists($_SERVER['PHP_AUTH_USER'])) { | 78 | if($this->wallabag->store->userExists($_SERVER['PHP_AUTH_USER'])) { |
73 | $this->wallabag->login($this->referer); | 79 | $this->wallabag->login($this->referer); |
@@ -105,7 +111,9 @@ class Routing | |||
105 | $tag_id = (isset($_GET['tag_id']) ? intval($_GET['tag_id']) : 0); | 111 | $tag_id = (isset($_GET['tag_id']) ? intval($_GET['tag_id']) : 0); |
106 | $limit = (isset($_GET['limit']) ? intval($_GET['limit']) : 0); | 112 | $limit = (isset($_GET['limit']) ? intval($_GET['limit']) : 0); |
107 | $this->wallabag->generateFeeds($_GET['token'], filter_var($_GET['user_id'],FILTER_SANITIZE_NUMBER_INT), $tag_id, $_GET['type'], $limit); | 113 | $this->wallabag->generateFeeds($_GET['token'], filter_var($_GET['user_id'],FILTER_SANITIZE_NUMBER_INT), $tag_id, $_GET['type'], $limit); |
108 | } | 114 | } //elseif (ALLOW_REGISTER && isset($_GET['register'])) { |
115 | //$this->wallabag->register | ||
116 | //} | ||
109 | 117 | ||
110 | //allowed ONLY to logged in user | 118 | //allowed ONLY to logged in user |
111 | if (\Session::isLogged() === true) | 119 | if (\Session::isLogged() === true) |