aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2016-10-24 02:25:16 +0200
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2016-10-24 02:25:16 +0200
commita6db495494130da044a95b57c65d944be45746ee (patch)
treedc889aa34f9f98746772d8bd72d9dbdcb0994334 /lib
parent1171461a2918d85ed16f406052b568843ca064c6 (diff)
CLI actualize-user
https://github.com/FreshRSS/FreshRSS/issues/1095
Diffstat (limited to 'lib')
-rw-r--r--lib/Minz/ModelPdo.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Minz/ModelPdo.php b/lib/Minz/ModelPdo.php
index 45139b0d6..6e8d60bc9 100644
--- a/lib/Minz/ModelPdo.php
+++ b/lib/Minz/ModelPdo.php
@@ -37,9 +37,10 @@ class Minz_ModelPdo {
*/
public function __construct($currentUser = null) {
if ($currentUser === null) {
- $currentUser = Minz_Session::param('currentUser', '_');
+ $currentUser = Minz_Session::param('currentUser');
}
- if (self::$useSharedBd && self::$sharedBd != null && $currentUser === self::$sharedCurrentUser) {
+ if (self::$useSharedBd && self::$sharedBd != null &&
+ ($currentUser == null || $currentUser === self::$sharedCurrentUser)) {
$this->bd = self::$sharedBd;
$this->prefix = self::$sharedPrefix;
$this->current_user = self::$sharedCurrentUser;