Community Support Forums — WordPress® ( Users Helping Users ) — 2011-11-24T08:57:01-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=16020 2011-11-24T08:57:01-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16020&p=53795#p53795 <![CDATA[Re: Showing user roles after login?]]>
Thx,
Aaron

Statistics: Posted by tripleaaadelay — November 24th, 2011, 8:57 am


]]>
2011-11-24T01:44:55-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16020&p=53775#p53775 <![CDATA[Re: Showing user roles after login?]]>
Code:

<?php
global $wp_roles;
    foreach ( 
$wp_roles->role_names as $role => $name )
                {
                        if (
current_user_can($role))
                                echo 
$role;
                }

?>

Statistics: Posted by Bruce C — November 24th, 2011, 1:44 am


]]>
2011-11-23T20:30:40-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16020&p=53773#p53773 <![CDATA[Showing user roles after login?]]>
I'm trying to show the s2Member user roles on my theme after users login.

In my header.php I can see this array:

$role = array(
10 => __( 'Administrator' , 'cosmotheme' ) ,
7 => __( 'Editor' , 'cosmotheme' ) ,
2 => __( 'Author' , 'cosmotheme' ) ,
1 => __( 'Contributor' , 'cosmotheme' ) ,
0 => __( 'Subscriber' , 'cosmotheme' ),
'' => __( 'Subscriber' , 'cosmotheme' )
);

How can I add the s2member roles?

Thanks,
Aaron

Statistics: Posted by tripleaaadelay — November 23rd, 2011, 8:30 pm


]]>