Jump to content


Popular Content

Showing content with the highest reputation on 10/07/19 in all areas

  1. 1 point
    Hi @Remitur, I've been bale to reproduce this on my end too, as such I've opened case CORE-13799 with our development team. Once we resolve cases and push features they are available at our change log, here: https://changelog.whmcs.com/ I apologize for the inconvenience, and appreciate your patience as we work to resolve this.
  2. 1 point
    Welcome to WHMCS.Community ethan786! We're glad you're here please take some time to familiarise yourself with the Community Rules & Guidelines and take a moment to introduce yourself to other WHMCS.Community members in the Introduce Yourself Board.
  3. 1 point
    @string is absolutely correct with his suggestion - using a Client Custom Field would be the way to go... the user would be asked to create it during their first order (if they're a new client), or if they are an existing client and logged in, they'll be able to edit the answer to your security question in their client area profile. I replied to a similar question last year with example code... it's very simple thing to do - you just need to decide where you want to show the PIN to the client... in the above example, it was a homepage panel... but you could equally put it in a sidebar (new/existing and decide which pages to show it on), menu navbar or output it in a template. it would only require one hook file to display the PIN in both the admin and client areas - to use it, you would create a .php file in /includes/hooks, call it 'phonepin.php' and paste the code below into it... <?php # Telephone Security PIN Hook # Written by brian! add_hook('ClientAreaHomepagePanels', 1, function($homePagePanels) { $client = Menu::context('client'); $length = 8; $phonepin = substr(preg_replace("/[^0-9]/", "", md5($client->id)), $length, $length); if ($phonepin) { $homePagePanels->addChild('Telephone PIN', array( 'name' => 'Pin', 'label' => '<strong>Telephone PIN</strong>', 'icon' => 'fa-life-ring', 'order' => 99, 'extras' => array( 'color' => 'pomegranate', ), 'bodyHtml' => '<p>Should you need to telephone Support, your PIN is: <strong>'.$phonepin.'</strong></p>' )); } }); add_hook('AdminAreaClientSummaryPage', 1, function($vars) { $length = 8; $phonepin = substr(preg_replace("/[^0-9]/", "", md5($vars["userid"])), $length, $length); return "<div class='alert alert-success'><strong>PIN: ".$phonepin."</strong></div>"; }); in this example, it's creating a basic PIN unique to each client and displaying it in a Panel on the Client Area homepage (the red box bottom-right)... ideally, if you're site is multilingual, then you would use a Language Overrides to display both the panel label and the line of text within $bodyhtml in the client's language. in the Admin Area Client Summary page, it will also output the same PIN for that particular client... as I said previously, you could output it in a sidebar too (as shown in first image)... add_hook('ClientAreaPrimarySidebar', 1, function($primarySidebar) { $client = Menu::context('client'); $length = 8; $phonepin = substr(preg_replace("/[^0-9]/", "", md5($client->id)), $length, $length); if ($client && $phonepin) { $primarySidebar->addChild('Telephone PIN', array( 'name' => 'Pin', 'label' => 'Telephone PIN', 'icon' => 'fa-life-ring', 'order' => 10, 'bodyHtml' => '<div class="text-center"><strong>'.$phonepin.'</strong></div>' )); } }); ... or in the secondary navbar... add_hook('ClientAreaSecondaryNavbar', 1, function($secondaryNavbar) { $client = Menu::context('client'); $length = 8; $phonepin = substr(preg_replace("/[^0-9]/", "", md5($client->id)), $length, $length); if ($client && $phonepin && !is_null($secondaryNavbar->getChild('Account'))) { $secondaryNavbar->getChild('Account')->addChild('Telephone PIN', array( 'label' => 'Telephone PIN: '.$phonepin, 'order' => 75 )); } }); as you can see, there are various options - all of which can be expanded to suit your needs.
  • 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