Code Duplication    Length = 13-13 lines in 2 locations

plugins/cpanel-change-password/xmlapi.php 2 locations

@@ 1179-1191 (lines=13) @@
1176
    * @return mixed
1177
    * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/TerminateAccount
1178
    */
1179
    public function removeacct($username, $keepdns = false)
1180
    {
1181
        if (!isset($username)) {
1182
            error_log("removeacct requires that a username is passed to it");
1183
1184
            return false;
1185
        }
1186
        if ($keepdns) {
1187
            return $this->xmlapi_query('removeacct', array('user' => $username, 'keepdns' => '1'));
1188
        }
1189
1190
        return $this->xmlapi_query('removeacct', array('user' => $username));
1191
    }
1192
1193
    /**
1194
    * Unsuspend an Account
@@ 1602-1614 (lines=13) @@
1599
    * @return mixed
1600
    * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/AddResellerPrivileges XML API Call documentation
1601
    */
1602
    public function setupreseller($username, $makeowner = true)
1603
    {
1604
        if (!isset($username)) {
1605
            error_log("setupreseller requires that username is passed to it");
1606
1607
            return false;
1608
        }
1609
        if ($makeowner) {
1610
            return $this->xmlapi_query('setupreseller', array('user' => $username, 'makeowner' => '1'));
1611
        }
1612
1613
        return $this->xmlapi_query('setupreseller', array('user' => $username, 'makeowner' => '0'));
1614
    }
1615
1616
    /**
1617
    * Create a New ACL List