Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php global $user_ID, $user_identity; get_currentuserinfo(); if (!$user_ID) { ?>
- <form method="post" action="<?php bloginfo('url') ?>/wp-login.php" class="login_form fix">
- <div class="input-group-lg fix">
- <label for="user_login">User Name:</label>
- <input type="text" name="log" placeholder="User Name" id="user_login" value="<?php echo esc_attr(stripslashes($user_login)); ?>" class="form-control" />
- </div>
- <div class="input-group-lg fix">
- <label for="login_pass">Password:</label>
- <input type="password" name="pwd" placeholder="Password" id="login_pass" class="form-control" />
- </div>
- <div class="input-submit fix">
- <?php do_action('login_form'); ?>
- <input type="submit" name="user-submit" value="<?php _e('Login'); ?>" tabindex="14" class="user-submit btn-lg submit_btn" />
- <input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>" />
- <input type="hidden" name="user-cookie" value="1" />
- </div>
- </form>
- <?php } else { ?>
- <div class="sidebox">
- <h3>Welcome, <?php echo $user_identity; ?></h3>
- <div class="usericon">
- <?php global $userdata; get_currentuserinfo(); echo get_avatar($userdata->ID, 60); ?>
- </div>
- <div class="userinfo">
- <p>You’re logged in as: <strong><?php echo $user_identity; ?></strong></p>
- <p>
- <a href="<?php echo wp_logout_url('index.php'); ?>">Log out</a> |
- <?php if (current_user_can('manage_options')) {
- echo '<a href="' . admin_url() . '">' . __('Admin') . '</a>'; } else {
- echo '<a href="' . admin_url() . 'profile.php">' . __('Profile') . '</a>'; } ?>
- </p>
- </div>
- </div>
- <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment