Hey Novakedward,
Are you still experiencing this problem? When we tried registering we were redirected to the login page.
Thanks!
I cleared my browser and it worked now.
Also I have a code set up if user is logged in, the menu changes and the menu did not change.
Also I can not login to my admin account through the plugin login, but it works fine through wp-admin login.
Hi Novakedward,
Thanks for getting back to us. Would you mind posting the code that you’re using for the menu changes so we can take a look at what might be happening?
As far as the admin account is concerned, that’s not really possible. The WP-admin login is necessary to use your admin account, the user levels feature is not a replacement for that function. Sorry!
<?php
if ( is_user_logged_in() ) {
?>
<ul class="nav navbar-nav navbar-right" style="padding-right: 20px;">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><?php
$current_user = wp_get_current_user(); echo '' . $current_user->user_login . '';?> <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="<?php echo get_page_link(19); ?>">Settings</a></li>
<li class="divider"></li>
<li class=""><a href="<?php echo wp_logout_url("http://mhsgame.x10host.com/"); ?>">Logout</a></li>
</ul>
</li> </ul>
<?php
} else {
?>
<ul class="nav navbar-nav navbar-right" style="padding-right: 20px;">
<li id="menu-item-13" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-13"><a href="<?php echo get_page_link(14); ?>">Register</a></li>
<li id="menu-item-13" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-13"><a href="<?php echo get_page_link(12); ?>">Login</a></li>
<?php
}
?>
Hi Nova,
Since the users aren’t registered the same as normal WP users (they aren’t able to use the admin Dashboard, etc.), the default WordPress function returns false. You would need to use the class specific to the plugin:
$User = new FEUP_User;
if ($User->Is_Logged_In()) {
//Content goes here
}
is there also a php way to display the current users info from the plugin?
and a way to list all the current registered users in a array?
That would be very helpful!
Hi Nova,
If you look at the file “Public_Functions.php”, in the “Functions” folder, there are methods for getting a user’s info from the plugin. There isn’t a way of getting all registered users in an array at this time unfortunately.