Home › Forums › Legacy Support › Support queries › How-to & Troubleshooting › member level
Tagged: membership, user
- This topic has 9 replies, 3 voices, and was last updated 3 years ago by Veronica.
Viewing 10 posts - 1 through 10 (of 10 total)
-
AuthorPosts
-
November 10, 2021 at 8:07 am #374397RagabSalemSpectatorhello, 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 meNovember 10, 2021 at 8:12 am #374398RagabSalemSpectatorThis reply has been marked as private.November 10, 2021 at 8:25 am #374402MrVibeKeymasterhow 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.November 10, 2021 at 8:32 am #374403RagabSalemSpectatorhttps://prnt.sc/1yzzoasNovember 10, 2021 at 8:32 am #374404RagabSalemSpectatorhttps://prnt.sc/1yzzugfNovember 11, 2021 at 12:46 pm #374476VeronicaModeratorhi 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/1z5c9xsNovember 15, 2021 at 2:02 am #374601RagabSalemSpectatorHello, 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
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)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 );
November 15, 2021 at 12:14 pm #374642VeronicaModeratorhi 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.November 15, 2021 at 2:44 pm #374667RagabSalemSpectatorok, can you recommend me a plugin to use itNovember 16, 2021 at 12:42 pm #374696VeronicaModeratorwell no, we can't recommend any plugin for this as we haven't any idea about this -
AuthorPosts
Viewing 10 posts - 1 through 10 (of 10 total)
- The topic ‘member level’ is closed to new replies.