From: Ævar Arnfjörð Bjarmason Date: Wed, 21 Dec 2005 05:15:26 +0000 (+0000) Subject: * Make User::isAllowed return true if passed an empty string X-Git-Tag: 1.6.0~913 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=7a4f7c9b36fa2efccdc04b976b97251f087e29a8;p=lhc%2Fweb%2Fwiklou.git * Make User::isAllowed return true if passed an empty string --- 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 ); }