<?php

/**
 * button Form login blog
 *
 */

?>
<li class="li-user-lo">
  <?php
  $current_user = wp_get_current_user();
  if (0 == $current_user->ID) {
  ?><i class="user-login-but fal fa-sign-in" onclick="document.getElementById('id01').style.display='block'" style="width:auto;" aria-hidden="true"></i>
  <?php
  } else { ?>
    <div class="navbar-lo">
      <ul class="navbar-nav">
        <li class="dropdown dropdown-nav-li seen-64-mobile">
          <a href="#" class="dropdown-toggle" onclick="document.getElementById('id01').style.display='block'" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
            <?php global $userdata;
            echo get_avatar($userdata->ID, 60); ?>
            <span class="caret"></span>
          </a>
          <ul class="dropdown-menu ">
            <li>
              <?php if (current_user_can('manage_options')) {
                echo '<a href="' .  ot_get_option('link_profile_user') . '">' . __('User profile', 'liosa') . '</a>';
              } else {
                $adminwordpress  = ot_get_option('adminwordpress', false);
                if ($adminwordpress == 'on') {
                  echo '<a href="' . ot_get_option('link_profile_user') . 'profile.php">' . __('User profile', 'liosa') . '</a>';
              ?>
            </li>
            <br>
        <?php }
              } ?>
        <li><a href="<?php echo wp_logout_url('index.php'); ?>"><?php _e('Exit', 'liosa'); ?></a></li>
          </ul>
        </li>
      </ul>
    </div>
  <?php
  }
