I have a php file included with my autoaction using the trigger onBeforeDeleteUser.
This file uses the id of the deleted user as this :
Code:
$userid = $action->string($user, '[var1_user_id]');
$folders = $action->string($user, '[post_folders]');
$cbUser = CBuser::getInstance($userid, false);
$token = $cbUser->getUserData()->getString( 'cb_token_api', '0' );
$url = JURI::base() . 'handle-command';
$ndata = [
'userid' => $userid,
'command' => 'erase-user',
'folders' => $folders
];
All is working fine when a user is deleted, but I would like to use the same php code manually with a button for our mods to trigger the deletion.
In this case, how can I get the user id of the viewed user so that I can pass this to my code ?