From 7a4f7c9b36fa2efccdc04b976b97251f087e29a8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Wed, 21 Dec 2005 05:15:26 +0000 Subject: [PATCH] * Make User::isAllowed return true if passed an empty string --- includes/User.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/User.php b/includes/User.php index 60e06fb8a1..ad81edd802 100644 --- a/includes/User.php +++ b/includes/User.php @@ -1118,6 +1118,10 @@ class User { * @return boolean True: action is allowed, False: action should not be allowed */ function isAllowed($action='') { + if ( $action === '' ) + // In the spirit of DWIM + return true; + $this->loadFromDatabase(); return in_array( $action , $this->mRights ); } -- 2.20.1