Add Google auth on Dashboard Profile

More Features for Dashboard : Dashboard use Google auth to get access.

How to


  1. Search yourwebsite \ content \ themes \ tokkoid \ templates \ profile.tpl
  2. Search and remove {include file="dashboard.tpl"}
  3. Last Put this code below under {include file="_header.dashboard.tpl"}
    {if $system['two_factor_enabled']}
      {if !$user->_data['user_two_factor_enabled'] && $system['two_factor_type'] == "google"}
    		{if $system['two_factor_enabled']}
    				{if !$user->_data['user_two_factor_enabled'] && $system['two_factor_type'] == "google"}
    					<img class="logo-dark ele_logo_pc" src="{$system['system_uploads']}/{$system['system_logo']}" alt="{__($system['system_title'])}" style="height:55px!important;padding:10px;">
    					<div class="google-auth">
    						<form class="js_ajax-forms p-3 pt-1" data-url="users/settings.php?edit=two-factor">
    							<div class="alert alert-info">
    								<div class="text">
    									<strong>{__("Two-Factor Authentication")}</strong><br>
    									{__("Log in with a code from your")}
    									{if $system['two_factor_type'] == "email"}{__("email")}{/if}
    									{if $system['two_factor_type'] == "sms"}{__("phone")}{/if}
    									{if $system['two_factor_type'] == "google"}{__("Google Authenticator App")}{/if}
    									{__("as well as a password")}
    								</div>
    							</div>
    							
    								<div class="heading-small mb-1">
    									{__("Configuring your authenticator")}
    								</div>
    
    								<ol class="mb-3">
    									<li class="mb5">
    										{__("You need to download Google Authenticator app for")} <a target="_blank" href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&hl=en">{__("Android")}</a> {__("or")} <a target="_blank" href="https://itunes.apple.com/eg/app/google-authenticator/id388497605?mt=8">{__("IOS")}</a>
    									</li>
    									<li>
    										{__("In your app, add a new account using the details below")}:
    									</li>
    									<li>
    										Please Activate your Account to use <b>Dashboard</b> <a href="{$system['system_url']}/settings/security/two-factor">{__("Two-Factor Authentication")}</a>
    									</li>
    								</ol>
    
    								<div class="row text-center">
    									<div class="col-md-6 mb-3">
    										<h6>{__("Scanning the QR code")}</h6>
    										<img src="{$two_factor_QR}">
    									</div>
    									<div class="col-md-6 align-self-center mb-3">
    										<h6>{__("Manually by entering this token")}</h6>
    										<h3>
    											<span class="badge bg-success">{$two_factor_gsecret}</span>
    										</h3>
    									</div>
    								</div>
    
    								<div class="heading-small mb-1">
    									{__("Activate your authenticator")}
    								</div>
    
    								<div class="form-floating">
    									<input name="gcode" type="text" class="form-control" placeholder="######" required autofocus>
    									<label class="form-label">{__("Verification Code")}</label>
    									<div class="form-text">
    										{__("Enter the code shown on your app")}
    									</div>
    								</div>
    								<div class="alert alert-success mt15 mb0 x-hidden"></div>
    								<div class="alert alert-danger mt15 mb0 x-hidden"></div>
    							<hr class="hr-2">
    
    							<div class="text-end">
    								<input type="hidden" name="type" value="{$system['two_factor_type']}">
    								<button type="submit" class="btn btn-primary">{__("Save Changes")}</button>
    								<a href="{$system['system_url']}/{$profile['user_name']}" class="btn btn-primary bg-gradient-blue border-0 rounded-pill">Back to Profile</a>
    							</div>
    						</form>
    					</div>
    				{else}
    					{include file='dashboard.tpl'}
    				{/if}
    			{else}
    				{include file='dashboard.tpl'}
    			{/if}
      {else}
      	{include file='dashboard.tpl'}
      {/if}
    {else}
    	{include file='dashboard.tpl'}
    {/if}
  4. Done

Location

And the location of {include file="dashboard.tpl"} placed like this below:

Selamat Datang di TOKKO ID

Jika anda membutuhkan bantuan kami silahkan Hubungi kami Team Tokko Official atau membutuhkan bantuan lain seperti dibawah ini:

Posting Komentar



Add Google auth on Dashboard Profile https://tokkoid.blogspot.com/2026/01/add-google-auth-on-dashboard-profile.html