@@ 554-563 (lines=10) @@ | ||
551 | * @throws ClientExceptions |
|
552 | * @throws Exception |
|
553 | */ |
|
554 | public function hasDigestAuth($user) |
|
555 | { |
|
556 | $params = ['user' => $user]; |
|
557 | $result = $this->client->sendRequest("/json-api/has_digest_auth", "GET", $params); |
|
558 | if ( ! empty($result['data'])) { |
|
559 | return $result['data']['digestauth'] === 1 ? true : false; |
|
560 | } |
|
561 | ||
562 | return null; |
|
563 | } |
|
564 | ||
565 | /** |
|
566 | * This function checks whether a cPanel user's home directory contains a valid .my.cnf file. |
|
@@ 576-585 (lines=10) @@ | ||
573 | * @throws ClientExceptions |
|
574 | * @throws Exception |
|
575 | */ |
|
576 | public function hasMyCnfInHomeDirectory($user) |
|
577 | { |
|
578 | $params = ['user' => $user]; |
|
579 | $result = $this->client->sendRequest("/json-api/has_mycnf_for_cpuser", "GET", $params); |
|
580 | if ( ! empty($result['data'])) { |
|
581 | return $result['data']['has_mycnf_for_cpuser'] === 1 ? true : false; |
|
582 | } |
|
583 | ||
584 | return null; |
|
585 | } |
|
586 | ||
587 | /** |
|
588 | * Modify a cPanel account's bandwidth quota. |