mirror of https://github.com/BOINC/boinc.git
parent
fdd221e7a0
commit
d670551ab3
|
@ -1223,6 +1223,8 @@ function boincuser_control($uid = NULL, $action = NULL) {
|
||||||
}
|
}
|
||||||
switch ($action) {
|
switch ($action) {
|
||||||
case 'ban':
|
case 'ban':
|
||||||
|
if (user_access('assign community member role')
|
||||||
|
OR user_access('assign all roles')) {
|
||||||
$penalty_period = variable_get('boinc_penalty_period', 7*24*60*60);
|
$penalty_period = variable_get('boinc_penalty_period', 7*24*60*60);
|
||||||
$boincuser_record = array(
|
$boincuser_record = array(
|
||||||
'uid' => $uid,
|
'uid' => $uid,
|
||||||
|
@ -1234,8 +1236,11 @@ function boincuser_control($uid = NULL, $action = NULL) {
|
||||||
unset($account->roles[$community_role]);
|
unset($account->roles[$community_role]);
|
||||||
user_save($account, array('roles' => $account->roles));
|
user_save($account, array('roles' => $account->roles));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'lift-ban':
|
case 'lift-ban':
|
||||||
|
if (user_access('assign community member role')
|
||||||
|
OR user_access('assign all roles')) {
|
||||||
$boincuser_record = array(
|
$boincuser_record = array(
|
||||||
'uid' => $uid,
|
'uid' => $uid,
|
||||||
'penalty_expiration' => 0,
|
'penalty_expiration' => 0,
|
||||||
|
@ -1246,6 +1251,7 @@ function boincuser_control($uid = NULL, $action = NULL) {
|
||||||
$account->roles[$community_role] = 'community member';
|
$account->roles[$community_role] = 'community member';
|
||||||
user_save($account, array('roles' => $account->roles));
|
user_save($account, array('roles' => $account->roles));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue