summaryrefslogtreecommitdiffstats
path: root/settings/ajax/togglegroups.php
diff options
context:
space:
mode:
authorkondou <kondou@ts.unde.re>2013-04-17 15:32:03 +0200
committerkondou <kondou@ts.unde.re>2013-07-21 13:55:25 +0200
commit05084e03a08206b736abd04522e10c97cd3f2fc3 (patch)
tree1352f5011a523db520ee0e899db8426ecc3fc68f /settings/ajax/togglegroups.php
parent94fcbc736e3500e0107d8e4f1ce5a2133fcdd8d8 (diff)
downloadnextcloud-server-05084e03a08206b736abd04522e10c97cd3f2fc3.tar.gz
nextcloud-server-05084e03a08206b736abd04522e10c97cd3f2fc3.zip
Use !== and === in settings.
Diffstat (limited to 'settings/ajax/togglegroups.php')
-rw-r--r--settings/ajax/togglegroups.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/settings/ajax/togglegroups.php b/settings/ajax/togglegroups.php
index f6fd9aba6d9..6963f9eb43c 100644
--- a/settings/ajax/togglegroups.php
+++ b/settings/ajax/togglegroups.php
@@ -7,7 +7,7 @@ $success = true;
$username = $_POST["username"];
$group = $_POST["group"];
-if($username == OC_User::getUser() && $group == "admin" && OC_User::isAdminUser($username)) {
+if($username === OC_User::getUser() && $group === "admin" && OC_User::isAdminUser($username)) {
$l = OC_L10N::get('core');
OC_JSON::error(array( 'data' => array( 'message' => $l->t('Admins can\'t remove themself from the admin group'))));
exit();
@@ -36,7 +36,7 @@ if( OC_Group::inGroup( $username, $group )) {
$error = $l->t("Unable to remove user from group %s", $group);
$success = OC_Group::removeFromGroup( $username, $group );
$usersInGroup=OC_Group::usersInGroup($group);
- if(count($usersInGroup)==0) {
+ if(count($usersInGroup) === 0) {
OC_Group::deleteGroup($group);
}
}