Jump to content

Need help regarding email verification


rabijit

Recommended Posts

is there any way to force email verification on whole client area .

 

i can do this

 

{if $emailVerificationPending}

 

<p> Verify your email to continue</p>

{else}

 

======

 

{/if}

 

via template level but want to implement in everywhere

 

mail.PNG

Link to comment
Share on other sites

Yah, but i am facing a issue, unable to disable in services or domains page. When i implement the code, it shows blank page

 

{if $emailVerificationPending}

<div class="tab-content">

<div class="alert alert-warning">

<strong class="text-center">Verify your email to continue further.</a>.</strong>

</div>

</div>

{else}

<div class="tab-content">

{include file="$template/includes/tablelist.tpl" tableName="ServicesList" filterColumn="3"}

<script type="text/javascript">

jQuery(document).ready( function ()

{

var table = jQuery('#tableServicesList').removeClass('hidden').DataTable();

{if $orderby == 'product'}

table.order([0, '{$sort}'], [3, 'asc']);

{elseif $orderby == 'amount' || $orderby == 'billingcycle'}

table.order(1, '{$sort}');

{elseif $orderby == 'nextduedate'}

table.order(2, '{$sort}');

{elseif $orderby == 'domainstatus'}

table.order(3, '{$sort}');

{/if}

table.draw();

jQuery('#tableLoading').addClass('hidden');

});

</script>

<div class="table-container disabled clearfix">

<table id="tableServicesList" class="table table-list hidden">

==================

</table>

<div class="text-center" id="tableLoading">

<p><i class="fa fa-spinner fa-spin"></i> {$LANG.loading}</p>

</div>

</div>

</div>

{/if}

Link to comment
Share on other sites

I've just has WHMCS support acknowledge a bug with the email verification links, regarding a "confused" logged in / out state when visiting the email verification links.

 

They have provided a temp fix for me, testing for this:

 

App :: get_req_var( 'verificationId' )

 

Testing for the above in a hook might help you do what you want?

 

Hope that helps.

Link to comment
Share on other sites

I've just has WHMCS support acknowledge a bug with the email verification links, regarding a "confused" logged in / out state when visiting the email verification links.

 

They have provided a temp fix for me, testing for this:

 

App :: get_req_var( 'verificationId' )

 

Testing for the above in a hook might help you do what you want?

 

Hope that helps.

your code can be used within action hook function

 

<?php

add_hook("ClientAreaPage", 1, function($vars){
   $verificationid = App::get_req_var( 'verificationId' );

   return array("verificationid" => $verificationid);
});

 

then you can call it from any template file

{$verificationid}

Link to comment
Share on other sites

I added hook to hook folder and the code you advised to template clientproducts & productdescriptions

but i can still select and add a product to cart logging in & using an unverified account test

 

which template file do i put your **{$verificationid}** in to stop them seeing/adding products to cart if not email verified ?

 

cheers

 

your code can be used within action hook function

 

<?php

add_hook("ClientAreaPage", 1, function($vars){
   $verificationid = App::get_req_var( 'verificationId' );

   return array("verificationid" => $verificationid);
});

 

then you can call it from any template file

{$verificationid}

Link to comment
Share on other sites

this might work

 

{if ($emailVerificationIdValid === false || $emailVerificationPending !== false) && !$showingLoginPage }
<div class="email-verification alert-warning">
       <div class="container">
           <i class="fa fa-warning"></i>
           {$LANG.verifyEmailAddress}
           <div class="pull-right">
               <button id="btnResendVerificationEmail" class="btn btn-default btn-sm">
                   {$LANG.resendEmail}
               </button>
           </div>
       </div>
   </div>
{else}
other content
{/if}

Link to comment
Share on other sites

if you need to hide client area content/sections (My Domains, My Services, etc) when client email not verified yet, and only display the email verification message.

 

open /templates/six/header.tpl for editing, and after this line ~ #216:

{include file="$template/includes/verifyemail.tpl"}

add the following:

{if ($emailVerificationIdValid === false || $emailVerificationPending !== false) && !$showingLoginPage }
{else}

 

now open /templates/six/footer.tpl, before this line ~ #12:

<section id="footer">

 

add the closing IF:

{/if}

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.

×
×
  • 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