member level

Tagged: ,

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #374397
    RagabSalem
    Spectator
    hello, how are you Now, I want to show content based on user level(membership or whatever) for example: user when a user registers an account it's required to choose a level. after user registration, the content on the home page is apparently based on the level that chooses. and the user can change the level any time that he used it before. what plugins, functions, or anything. it's very important to us. I will share a video on other site to understand me
    #374398
    RagabSalem
    Spectator
    This reply has been marked as private.
    #374402
    MrVibe
    Keymaster
    how are you defining user levels? are you using BP member types for this ? Seen by Mohamed Redwan at 1:54 PM is user also logged into WordPress while logged in ? if yes, then we can switch the home page for the logged in user, based on the user's member type.
    #374403
    RagabSalem
    Spectator
    https://prnt.sc/1yzzoas
    #374404
    RagabSalem
    Spectator
    https://prnt.sc/1yzzugf
    #374476
    Veronica
    Moderator
    hi check this response: https://wordpress.stackexchange.com/a/358582 http://prntscr.com/1z5c3lu and with this code you can add bp_get_member_type function like this: https://codex.buddypress.org/developer/member-types/#:~:text=Fetching%20and%20setting%20individuals'%20member,change%20a%20user's%20member%20type. http://prntscr.com/1z5c9xs
    #374601
    RagabSalem
    Spectator
    Hello, I think you don't understand me. now, I will use role instead of membership first, I redirect login in user based on role by this code
    function user_login_redirect( $url, $request, $user ){
    	if( $user && is_object( $user ) && is_a( $user, 'WP_User' ) ) {
    		if( $user->has_cap( 'administrator' ) ) {
    			$url = admin_url();
    		} elseif( $user->has_cap( 'aussteller' ) ) {
    			$url = home_url('/account/ausstellerbereich/');
    		} elseif( $user->has_cap( 'topperformer' ) ) {
    			$url = home_url('/account/top-performer-bereich/');
    		} else {
    			$url = home_url();
    		}
    }
    return $url;
    }
    add_filter( 'login_redirect', 'user_login_redirect', 10, 3 );
    and it's working well. second: if a user is on a specific page I want to redirect him to another page (based on role)
    #374642
    Veronica
    Moderator
    hi this is not available we do not know the URL at the login redirect filter for this. this setting is not available as of now in wplms. you can use a third-party plugin for this.
    #374667
    RagabSalem
    Spectator
    ok, can you recommend me a plugin to use it
    #374696
    Veronica
    Moderator
    well no, we can't recommend any plugin for this as we haven't any idea about this
Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘member level’ is closed to new replies.