diff --git a/_sakura/changelog.json b/_sakura/changelog.json index e86b511..67c9e81 100644 --- a/_sakura/changelog.json +++ b/_sakura/changelog.json @@ -10,7 +10,8 @@ "20150427", "20150427.1", - "20150427.2" + "20150427.2", + "20150427.3" ] @@ -712,6 +713,15 @@ "change": "Fixed bug caused by bug fix in login process (ironic)." } + ], + + "20150427.3": [ + + { + "type": "FIX", + "change": "Fixed bug in rank checking function (didn't decode the json string)." + } + ] } diff --git a/_sakura/components/Users.php b/_sakura/components/Users.php index 9d761d2..bcc0617 100644 --- a/_sakura/components/Users.php +++ b/_sakura/components/Users.php @@ -650,11 +650,14 @@ class Users { if(in_array($user['rank_main'], $ranks)) return true; + // Decode the json for the user's ranks + $uRanks = json_decode($user['ranks'], true); + // If not go over all ranks and check if the user has them foreach($ranks as $rank) { // We check if $rank is in $user['ranks'] and if yes return true - if(in_array($rank, $user['ranks'])) + if(in_array($rank, $uRanks)) return true; } diff --git a/_sakura/sakura.php b/_sakura/sakura.php index 384962e..db3d3ae 100644 --- a/_sakura/sakura.php +++ b/_sakura/sakura.php @@ -8,7 +8,7 @@ namespace Sakura; // Define Sakura version -define('SAKURA_VERSION', '20150427.2'); +define('SAKURA_VERSION', '20150427.3'); define('SAKURA_VLABEL', 'Heliotrope'); define('SAKURA_VTYPE', 'Development'); define('SAKURA_COLOUR', '#DF73FF');