rabijit Posted April 11, 2016 Share Posted April 11, 2016 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 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted April 11, 2016 Share Posted April 11, 2016 you may need to edit many template files 0 Quote Link to comment Share on other sites More sharing options...
rabijit Posted April 12, 2016 Author Share Posted April 12, 2016 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} 0 Quote Link to comment Share on other sites More sharing options...
gbotica Posted April 12, 2016 Share Posted April 12, 2016 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. 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted April 13, 2016 Share Posted April 13, 2016 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} 0 Quote Link to comment Share on other sites More sharing options...
rabijit Posted April 13, 2016 Author Share Posted April 13, 2016 not so sure how to implement it 0 Quote Link to comment Share on other sites More sharing options...
SportsGalore Posted April 15, 2016 Share Posted April 15, 2016 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} 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted April 18, 2016 Share Posted April 18, 2016 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} 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted April 18, 2016 Share Posted April 18, 2016 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} 0 Quote Link to comment Share on other sites More sharing options...
rabijit Posted April 19, 2016 Author Share Posted April 19, 2016 I implement the second method and got the result below 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted April 19, 2016 Share Posted April 19, 2016 I implement the second method and got the result below[ATTACH=CONFIG]10739[/ATTACH] yes, you will need to make this with each template then :\ 0 Quote Link to comment Share on other sites More sharing options...
rabijit Posted April 19, 2016 Author Share Posted April 19, 2016 thanks a lot. Now i understand correctly. 1st method is to implement in templates and if i implement 1st with 2nd then it will hide everything and force to verify email first. 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.