Jump to content

Is there any way to Mass Delete Inactive user who using USD only with PhpMyadmin ?


serverbd

Recommended Posts

On 9/20/2021 at 6:18 PM, serverbd said:

Is there any way to Mass Delete Inactive user who using Currency USD only with PhpMyadmin ?

Hello

it is better use Local API
 

Please go to PhpMyadmin and open tblcurrencies  

use currency id to following code  ( the currency  from tblcurrencies )

<?php
require_once 'init.php';
use whmcs\Capsule as DB;

$clients  =  DB::table('tblclients')->where('status','Inactive')->where('currency','the curency from tblcurrencies')->get();

foreach ($clients as $client){
   $command = 'DeleteClient';
   $postData = array(
      'clientid' => $client->id,
      'deleteusers' => false,// Delete any users not associated with any other client. recommended change to true
      'deletetransactions' => true, // Delete all transactions on this account. recommended change to true
   );

   $results = localAPI($command, $postData);
   print_r($results);


}
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated