diff options
| author | 2015-01-13 15:26:42 +0100 | |
|---|---|---|
| committer | 2015-01-13 15:26:42 +0100 | |
| commit | e8556ac1a4c00b4e44e88a7d73feca6f7462fc34 (patch) | |
| tree | 9a6a1200f4e7710932197c8f129e6360bf76c0e1 | |
| parent | 59760580d2e6856ee66dedb0ae33829aea29c971 (diff) | |
Change behaviour if authorizationToUser is null
authorizationToUser() returns now an empty string by default
If it returns an empty string, conf is set to null and api don't die
anymore.
Fix https://github.com/FreshRSS/FreshRSS/issues/747
| -rw-r--r-- | p/api/greader.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/p/api/greader.php b/p/api/greader.php index 2c23b30a2..20f72cc3b 100644 --- a/p/api/greader.php +++ b/p/api/greader.php @@ -168,7 +168,7 @@ function authorizationToUser() { } } } - return null; + return ''; } function clientLogin($email, $pass) { //http://web.archive.org/web/20130604091042/http://undoc.in/clientLogin.html @@ -552,10 +552,10 @@ if (!$system_conf->api_enabled) { Minz_Session::init('FreshRSS'); $user = authorizationToUser(); -if (is_null($user)) { - unauthorized(); +$conf = null; +if ($user !== '') { + $conf = get_user_configuration($user); } -$conf = get_user_configuration($user); logMe('User => ' . $user . "\n"); |
