Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| technical:api-pu-disable [2025/04/13 09:32] – system | technical:api-pu-disable [2025/04/13 15:13] (current) – system | ||
|---|---|---|---|
| Line 7: | Line 7: | ||
| ====== Enable and Disable Permanent Users ====== | ====== Enable and Disable Permanent Users ====== | ||
| + | <alert type=" | ||
| + | * RADIUSdesk includes a component called ' | ||
| + | * When this component is configured, any active sessions for a user will be terminated upon the completion of the enable or disable action. | ||
| + | * This comes in handy to move a user into or out of an isolation VLAN or network. | ||
| + | </ | ||
| * To enable or disable a Permanent User we have to first determine the id of the Permanent User. | * To enable or disable a Permanent User we have to first determine the id of the Permanent User. | ||
| * A CRM system typically do not know the id of the Permanent User in RADIUSdesk. | * A CRM system typically do not know the id of the Permanent User in RADIUSdesk. | ||
| Line 22: | Line 27: | ||
| | | ||
| $username | $username | ||
| - | $action | + | $action |
| | | ||
| // Filter settings | // Filter settings | ||
| Line 29: | Line 34: | ||
| $value | $value | ||
| $limit | $limit | ||
| - | + | ||
| - | $find_url | + | $filter_array = [ |
| + | [ | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | ] | ||
| + | ]; | ||
| + | |||
| + | $encoded_filter = urlencode(json_encode($filter_array)); | ||
| + | |||
| + | $find_url = " | ||
| | | ||
| Line 63: | Line 78: | ||
| ] | ] | ||
| ]); | ]); | ||
| + | | ||
| + | print($find_url); | ||
| // Get the response | // Get the response | ||
| Line 81: | Line 98: | ||
| $listOfIds[$id] = $id; | $listOfIds[$id] = $id; | ||
| } | } | ||
| - | echo "There $count items!"; | + | echo "There $count items\n"; |
| return $listOfIds; | return $listOfIds; | ||
| } else { | } else { | ||
| Line 88: | Line 105: | ||
| return false; | return false; | ||
| } | } | ||
| - | + | ||
| ?> | ?> | ||
| </ | </ | ||
| Line 110: | Line 127: | ||
| $filter | $filter | ||
| $operator | $operator | ||
| - | $value | + | $value |
| $limit | $limit | ||
| </ | </ | ||
| - | |||
| - | |||