{capture assign="password_block"} {/capture} {capture assign="waid_block"} {if $is_connected_to_webasyst_id && ($contact['is_user'] == '1' || $is_bound_with_webasyst_contact)}
[`Sign-in with Webasyst ID`]
{if $is_bound_with_webasyst_contact} {* own or other uses's profile is connected to webasyst ID *} {if $webasyst_id_email} {sprintf(_w('Webasyst ID account %s is connected.'), $webasyst_id_email)} {else} {sprintf(_w('%sSign-in with Webasyst ID%s is connected.'), '', '')} {/if} {* authorize into customer center - available only for own profile *} {if $customer_center_auth_url} [`Go to the Webasyst Customer Center`] {/if} {if !$is_webasyst_id_forced} [`Disconnect`] {/if}

[`Last sign-in`] {$contact.last_datetime|wa_date:"humandatetime"|lower}

{elseif $is_own_profile} {* own profile is not connected to webasyst ID *} {else} {* other user's profile (not own) is connected to webasyst ID *} [`Webasyst ID is not connected`]

{sprintf('[`User %s has not connected Webasyst ID yet. Secure sign-in option with 2-factor authentication (2FA) for your Webasyst backend and access to all Webasyst services and mobile apps will become available only when Webasyst ID is connected.`]', $contact['login']|escape)}

{/if}
{/if} {/capture}
{if !$is_superadmin}
{if !$is_webasyst_id_forced}
[`Login`]
{$password_block} {/if} {$waid_block}
{elseif $is_superadmin} {/if}{* if $is_superadmin *}
{* Access *}
[`Access`]
  • {* Toggle to ban user or contact. Can not ban self. *} {if empty($own_profile)}{strip} {/strip}{else} {if $contact.is_user == '-1'}[`Disabled`]{else}[`Enabled`]{/if} {/if}
{* Api tokens *} {if $is_superadmin && !empty($api_tokens)}
[`API tokens`]
{foreach $api_tokens as $_token} {/foreach}
[`Create date`] [`Client id`] [`Scope`] [`Last use date`] [`Expires`]
{$_token.create_datetime|wa_date:humandatetime} {$_token.client_id|escape} {foreach $_token.installed_apps as $_app} {/foreach} {foreach $_token.not_installed_apps as $_app} {$_app|escape}{if !$_app@last},{/if} {/foreach} {if !empty($_token.last_use_datetime)} {$_token.last_use_datetime|wa_date:humandatetime} {else} {/if} {if !empty($_token.expires)} {$_token.expires|wa_date:humandatetime} {else} {/if}
{/if} {* Customer portal *}