Forum Replies Created
-
AuthorPosts
-
Sunshine
ParticipantThanks for the explanation.
I would like to create some secret pages for different level of users.
User has to visit the login page again because I don’t want to reveal the link of the page that members of different levels will be redirected to.
Therefore I didn’t create any link to the secret pages at the login page which is the entrance of the member only area.Once the member is logged in, I hope the user will be redirected to a specific page when he visits the login page again.
Would it be possible to do that ?Sunshine
Participantyes, it works well when the user log in for the first time.
But when the member is logged in and access the login page again, only the user details (loggedin.php) were shown.
The user has not been redirected to the designated page.Sunshine
ParticipantMay I know if the following code is correct if I want to redirect the members of a particular member level to the designated page? I am going to add the following code in loggedin.php.
<?php
if (SwpmMemberUtils::is_member_logged_in()) {
$member_level = SwpmMemberUtils::get_logged_in_members_level();
if ($member_level == “2”) {
wp_redirect( ‘URL’ );
exit;}
}
?>Sunshine
ParticipantThank you for your reply.
For example, When a member logs in for the first time from the login page,
he was redirected to the designated page successfully after login.
Then while the member is logged in and accesses the login page again,
he was not redirected to the designated page.
So he entered the username and password again but he was not redirected to the designated page neither.My question is how can I redirect the logged member to the designated page when he accesses the login page again?
For your information, I am using the following code on the login page.<form id=”swpm-login-form” action=”” method=”post” name=”swpm-login-form”>
<div class=”swpm-login-form-inner”>
<div class=”swpm-username-label”><label class=”swpm-label” for=”swpm_user_name”>Username or Email</label></div>
<div class=”swpm-username-input”><input id=”swpm_user_name” class=”swpm-text-field swpm-username-field” name=”swpm_user_name” size=”25″ type=”text” value=”” /></div>
<div class=”swpm-password-label”><label class=”swpm-label” for=”swpm_password”>Password</label></div>
<div class=”swpm-password-input”><input id=”swpm_password” class=”swpm-text-field swpm-password-field” name=”swpm_password” size=”25″ type=”password” value=”” /></div>
<div class=”swpm-remember-me”><span class=”swpm-remember-checkbox”><input name=”rememberme” type=”checkbox” value=”checked=’checked'” /></span>
<span class=”swpm-rember-label”> ログイン情報を保存</span></div>
<div class=”swpm-before-login-submit-section”></div>
<div class=”swpm-login-submit”><input class=”swpm-login-form-submit” name=”swpm-login” type=”submit” value=”Login ログイン” /></div>
<div></div>
<div class=”swpm-forgot-pass-link”>パスワードを忘れた?</div>
<div class=”swpm-login-action-msg”></div>
</div>
</form> -
AuthorPosts