Community discussions

MikroTik App
 
RajeevElzrando
just joined
Topic Author
Posts: 2
Joined: Wed Oct 05, 2022 2:29 pm

Activation Failing With No Such Command Error in PHP

Mon Jan 02, 2023 8:02 am

I have the following function to activate a Profile for a registered user using the RouterOS php library

public function activateProfile($username)
{
$activationQuery = new Query(
'/tool/user-manager/user/create-and-activate-profile',
[
'=user=' . $username,
'=customer=admin',
'=profile=profile1',
]
);
$response = $this->query($activationQuery)->read(false);
print("Activating Profile...");
print_r($response);
}
But I keep getting the error message below

Activating Profile...Array ( [0] => !trap [1] => =message=no such command [2] => !done )

Who is online

Users browsing this forum: No registered users and 82 guests