Code Duplication    Length = 11-15 lines in 2 locations

htdocs/lib2/logic/user.class.php 2 locations

@@ 930-944 (lines=15) @@
927
        return false;
928
    }
929
930
    public function canDisable()
931
    {
932
        global $login;
933
        $login->verify();
934
935
        if ($login->userid != $this->nUserId && ($login->admin & ADMIN_USER) != ADMIN_USER) {
936
            return false;
937
        }
938
939
        if ($this->getIsActive() != 0) {
940
            return true;
941
        }
942
943
        return false;
944
    }
945
946
    public function disable()
947
    {
@@ 1030-1040 (lines=11) @@
1027
        return !$error;
1028
    }
1029
1030
    public function canDisableDueLicense()
1031
    {
1032
        global $login;
1033
        $login->verify();
1034
1035
        if ($login->userid != $this->nUserId && ($login->admin & ADMIN_USER) != ADMIN_USER) {
1036
            return false;
1037
        }
1038
1039
        return true;
1040
    }
1041
1042
    /**
1043
     * disables user (if not disabled), removes all licensed content from db and