Jump to content

customers without security answers


snake

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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)

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