snake Posted April 5, 2017 Share Posted April 5, 2017 Before I go manually digging into the database, is there by chance any hidden way to deal with customers who do not havea security question/answer setup, i.e. send them all an email and ask them to login and set their security answer ? Also, is there any way to enable the security question for each contact rather than only the main contact? I'm sure the main contact doesn;t want all his employees know his security question/answer as that is likely personal info he uses on other sites too. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 5, 2017 Share Posted April 5, 2017 Before I go manually digging into the database, is there by chance any hidden way to deal with customers who do not havea security question/answer setup, i.e. send them all an email and ask them to login and set their security answer ? closest I can think of is Tom's hook in the thread below... https://forum.whmcs.com/showthread.php?123798-Require-security-question-selection-if-empty-amp-notify-client-on-change Also, is there any way to enable the security question for each contact rather than only the main contact? I'm sure the main contact doesn;t want all his employees know his security question/answer as that is likely personal info he uses on other sites too. I think they're for main contacts only. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS ChrisD Posted April 6, 2017 Share Posted April 6, 2017 Before I go manually digging into the database, is there by chance any hidden way to deal with customers who do not havea security question/answer setup, i.e. send them all an email and ask them to login and set their security answer ? Also, is there any way to enable the security question for each contact rather than only the main contact? I'm sure the main contact doesn;t want all his employees know his security question/answer as that is likely personal info he uses on other sites too. As brian! mentioned the security questions are for main accounts rather than sub-contacts. 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted April 6, 2017 Share Posted April 6, 2017 Before I go manually digging into the database, is there by chance any hidden way to deal with customers who do not havea security question/answer setup, i.e. send them all an email and ask them to login and set their security answer ? the only way to do this is to query "tblclients" table and get list with clients with no security question set, after that you can use API:SendEmail to notify your clients by email to login and configure their security question. create new file in WHMCS main directory (securitynotification.php) for example, and copy the following code inside it: <?php /** * Send Email To Clients With No Security Question Configured * * @author SENTQ <development@sentq.com> * @version 1.0 (06/04/2017) * @link http://www.sentq.com/ */ require_once("init.php"); # This Page is Accessable For Admins Only if (!$_SESSION['adminid']){ die("Unauthorized Access"); } use WHMCS\Database\Capsule; # Get Clients With NO Security Questions $clients = Capsule::table("tblclients")->where("securityqid", "=", 0); foreach ($clients->get() as $client){ # Build Email Params $emailData = array( 'customtype' => 'general', 'customsubject' => 'Secure Your Account Today!', 'custommessage' => nl2br('Hi {$client_first_name},\n We require all of our clients to setup a security question to protect and to validate their accounts,\n To configure your account security click on the link below:\n <a href="{$whmcs_url}/clientarea.php?action=security">{$whmcs_url}/clientarea.php?action=security</a>\n Regards,\n {$company_name}'), 'customvars' => array( "client_first_name" => $client->firstname, "whmcs_url" => rtrim($CONFIG['SystemURL'], "/"), "company_name" => $CONFIG['CompanyName'], ), 'id' => $client->id ); # Send Email $results = localAPI('SendEmail', $emailData); # Print API Send Email Result print_r($results); } ?> this page will be accessible to admins only, so once you logged-in as admin go to http://your-whmcs-installation/securitynotification.php and it will start sending the message to these clients. 0 Quote Link to comment Share on other sites More sharing options...
snake Posted April 13, 2017 Author Share Posted April 13, 2017 Shame about the security question being only for main user, it seems rather short sighted to assume that only 1 person would be responsible for all communication. I have got round this by adding a a generic non personal question. A secret word or passphrase (which can be shared with others) 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.