Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- global $user_ID, $user_identity, $user_login;
- get_currentuserinfo();
- if (!$user_ID): // Non connecte
- ?>
- <form method="post" id="loginform" class="user_box" action="<?php bloginfo('home'); ?>/wp-login.php">
- <div>
- <input type="text" value="<?php echo wp_specialchars(stripslashes($user_login), 1); ?>" name="log" id="login" />
- <input type="password" value="" name="pwd" id="password" />
- <input class="hidden" type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>" />
- <input class="hidden" type="hidden" name="rememberme" value="forever" />
- <input type="submit" id="loginsubmit" value="OK" />
- </div>
- </form>
- <?php else : // Connecte ?>
- <div class="user_box" id="user_connected">
- <span><?php echo wp_specialchars(stripslashes($user_identity), 1); ?></span>
- <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout&redirect_to=<?php echo urlencode($_SERVER['REQUEST_URI']); ?>" title="Deconnexion" class="logout">Déconnexion</a>
- </div>
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement