Here's what I have for my WHMCS Hook:
<?php
function hook_api_suspend($vars) {
$table = "apis_user_profiles";
$update = array("status"=>"0");
$where = array("user_id"=>"342329");
update_query($table,$update,$where);
}
add_hook('AfterModuleSuspend', 1, 'hook_api_suspend');
?>
This is the line I'm specifically having problems with:
$where = array("user_id"=>"342329");
When I suspend an account, it does update the status correctly for the user with a user_id
of 342329. However, how can I make it use the user_id of the actual user's account who is getting suspended? I've already tried entering a few variables there but none seem to be working...?