Problems with get_currentuserinfo(), $user_email and $user_url
-
I’ve just upgraded to WP1.5 with a new template. Unfortunately, I’m having some problems with the variables returned by
get_currentuserinfo()
in the comments template.This is the code I’m using:
<?php get_currentuserinfo(); ?>
<?php if ( $user_ID ) : ?>
Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="<?php _e('Log out of this account') ?>">Logout »</a>
<input type="hidden" name="author" value="<?php echo $user_identity; ?>;" />
<input type="hidden" name="email" value="<?php echo $user_email; ?>" />
<input type="hidden" name="url" value="<?php echo $user_url; ?>" />
<?php else : ?>
The problem is that
$user_identity
is returned correctly, but$user_url
and$user_email
are empty. (This means that while I’m logged in, I can’t comment because those fields are required.)I can’t for the life of me work out what’s wrong. Any suggestions?
- The topic ‘Problems with get_currentuserinfo(), $user_email and $user_url’ is closed to new replies.