-
Author
Tagged: refresh, S2Member, pro, login refresh, membership, login, login redirect
-
November 14, 2014 at 03:33 #35393tattoobooksonlineParticipant
Not sure if this is an S2 member plugin issue but… before I installed this theme, user would login – then be re-directed to the S2 Member page “Welcome Back!”
Now they click the log in box, and it changes to text “You are logged in, click refresh”
This happens with Admin AND non-Admin (I read through some posts to see if this was already found by someone else)…
Attachments:
You must be logged in to view attached files.November 14, 2014 at 18:41 #35456KamalModeratorHi,
You are having this problem, because your plugin is conflicting against KLEO Ajax login redirection. SO far I know s2 member redirects to home page and KLEO ajax login redirect to the current page. So this is the main problem. You can give me access to your wp site. I can check and see if there is any option to disable s2 member redirection. Otherwise, I will try to create a function for redirection for you. Thanks.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionNovember 16, 2014 at 17:48 #35687KamalModeratorHi,
Your post is marked as private. Besides, you can mark your post as private when posting it. By the way, I am checking your problem. I will let you know shorty. Thank you very much.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionNovember 17, 2014 at 02:38 #35709KamalModeratorHi,
I am sorry to inform you that I tried about 1 hour to fix your problem. Redirection works fine without ajax login. I could redirect non-admin user to welcome-back page. However, I tried to fix ajax login redirection with a function. However, while saving the function file I missed a concatenation operator “.”. So I got an error. but then I went back to update the file but I could not update the file at all.An error was shown. Please see the screenshots.Now I badly need the ftp access to edit the functions.php file of kleo child theme. and you can also edit the file and remove the last functions of that file. Please give me a temporary access or update the functions.php file. Thanks.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionAttachments:
You must be logged in to view attached files.November 17, 2014 at 02:49 #35713tattoobooksonlineParticipant*I think I forgot to check “set private!”
on those credsNovember 17, 2014 at 03:00 #35714tattoobooksonlineParticipantCOPY CODEfunction custom_login_redirect( $redirect_to, $request, $user ) { return ( is_array( $user->roles ) && in_array( 'administrator', $user->roles ) ) ? admin_url() : site_url()'/welcome-back/'; } // end custom_login_redirect add_filter( 'login_redirect', 'custom_login_redirect', 10, 3 );
was removed
November 17, 2014 at 03:04 #35715tattoobooksonlineParticipantI just realized – you forgot the
COPY CODE?>
November 17, 2014 at 03:05 #35716tattoobooksonlineParticipantYou should be able to get back into admin dash on wp installation –
Your code was missing the “end php tag”November 17, 2014 at 18:46 #35778KamalModeratorHi,
After trying for hours and googling, I have come to know that it is a known problem with s2 member pro plugin. It conflicts with ajax login and wordpress redirection. This plugin also overwrites wordpress default user roles. The redirection works fine with normal login with the following code on functions.php.COPY CODEfunction only_admins_login_area( $redirect_to, $request, $user ) { global $user; if ( isset( $user->roles ) && is_array( $user->roles ) ) { //check for admins if ( in_array( 'administrator', $user->roles ) ) { // Redirect to default admin area return $redirect_to; } } return home_url()."/welcome-back/"; } add_filter( 'login_redirect', 'only_admins_login_area', 10, 3 );
I have tried it on my server also. but your problem is plugin related. Please ask about ajax login problem on their forum. You can get best solution there. Thank you very much for your assistance and patience.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
The forum ‘KLEO’ is closed to new topics and replies.