Commit ed7ea849 authored by imac's avatar imac

[Update]Show userLogin if empty name

parent 2549582a
...@@ -680,7 +680,11 @@ function get_logged_user() { ...@@ -680,7 +680,11 @@ function get_logged_user() {
if (is_user_logged_in()) { if (is_user_logged_in()) {
global $current_user; global $current_user;
get_currentuserinfo(); get_currentuserinfo();
if($current_user->user_lastname || $current_user->user_firstname){
echo $current_user->user_lastname . ' ' . $current_user->user_firstname; echo $current_user->user_lastname . ' ' . $current_user->user_firstname;
}else{
echo $current_user->user_login;
}
echo '<span class = "logout"><a href="' . wp_logout_url( home_url() ) . '">déconnexion</a></span>'; echo '<span class = "logout"><a href="' . wp_logout_url( home_url() ) . '">déconnexion</a></span>';
} else { } else {
echo '<a class="login" href="#">accès pro</a>'; echo '<a class="login" href="#">accès pro</a>';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment