File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed
custom/panel_templates/Default/core Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 262
262
<form style =" display :none " action =" { $VALIDATE_USER_LINK } " method =" post" id =" validateUserForm" >
263
263
<input type =" hidden" name =" token" value =" { $TOKEN } " />
264
264
</form >
265
- <form style =" display :none " action =" { $DISABLE_TFA_LINK } " method =" post" id =" disableTfaForm" >
266
- <input type =" hidden" name =" token" value =" { $TOKEN } " />
267
- </form >
268
265
266
+ { if isset($DISABLE_TFA_LINK )}
267
+ <form style =" display :none " action =" { $DISABLE_TFA_LINK } " method =" post" id =" disableTfaForm" >
268
+ <input type =" hidden" name =" token" value =" { $TOKEN } " />
269
+ </form >
270
+ { /if }
269
271
270
272
{ include file= ' scripts.tpl' }
271
273
Original file line number Diff line number Diff line change 331
331
'NEW_PASSWORD ' => $ language ->get ('user ' , 'new_password ' ),
332
332
'CONFIRM_NEW_PASSWORD ' => $ language ->get ('user ' , 'confirm_new_password ' ),
333
333
'CHANGE_PASSWORD ' => $ language ->get ('user ' , 'change_password ' ),
334
-
335
- 'DISABLE_TFA ' => $ language ->get ('admin ' , 'disable_tfa ' ),
336
- 'DISABLE_TFA_LINK ' => URL ::build ('/panel/users/edit/ ' , 'id= ' . urlencode ($ user_query ->id ) . '&action=disable_tfa ' )
337
334
]);
335
+
336
+ if ($ view_user ->data ()->tfa_complete ) {
337
+ $ template ->getEngine ()->addVariables ([
338
+ 'DISABLE_TFA ' => $ language ->get ('admin ' , 'disable_tfa ' ),
339
+ 'DISABLE_TFA_LINK ' => URL ::build ('/panel/users/edit/ ' , 'id= ' . urlencode ($ user_query ->id ) . '&action=disable_tfa ' )
340
+ ]);
341
+ }
338
342
}
339
343
340
344
$ limit_groups = false ;
You can’t perform that action at this time.
0 commit comments