fuck user management

This commit is contained in:
Pachira 2015-04-27 15:21:39 +00:00
parent 64b8845e73
commit c494b412a3
3 changed files with 16 additions and 3 deletions

View file

@ -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)."
}
]
}

View file

@ -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;
}

View file

@ -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');