For those of you using the REST API free plugin, the check-access method will not return an error if the account is locked manually by an admin or by account sharing prevention methods by default. If you'd like to add this, open the CheckAccessController.php file in application/api/controllers/ and add THIS chunk of code: PHP: /** CUSTOM: Fail user check if aMember account is locked */ if($user->isLocked()) { $ret['ok'] = false; $ret['msg'] = 'Billing account is locked/suspended'; $ret['code'] = 'locked'; } /** END CUSTOM */ AFTER this chunk of code in the checkUser() function (the first function) PHP: if ($user) { $accessRecords = $user->getActiveProductsExpiration(); $ret = array( 'ok' => true, 'name' => $user->getName(), ); You can change the error code and message to whatever you like.[/PHP]
I should probably clarify that this is only for the check-by-email method, you would have to add that to the other methods if you're using the check-by-username or check-by-login methods.
Sorry, cancel that. the checkUser() method which I advised putting this code in at first is called by all those action methods.