|
Hi, David:
Thanks for the reply, I made up one according to your template:
*But I am kinda lost on what to put on the first part?which is the code below
“//put a function here to get whatever name…”
However, what I did is here, is that correct?
What I intent to do:
1. The user will has a single client specific page LINK created (the link will be able to access through a specific short code) once the user name is registered. However the PAGE itself is NOT exist yet, so that why there is 404 page after login, because login-welcome-page is setup as “http://mysite.com/%%current_user_login%%/”.
I need to maintain this address inside the login-welcome-page to let the client portal runs.
2.The code you gave me seem will achieve the purpose but I don’t really get the meaning of the first part. please help thanks again!
Btw the page slug means I need to use page id? or simply the page’s link? my profile page link is simply http://www.abc.com/trial/profile, so I replace all the slug with profile, is that accurate? or should I replace it with page id?
Below is modification:
<?php
add_action('find the right hook','my_login_function');
function my_login_function($user_id){
//put a function here to get whatever name or username or id or whatever you are using as the page title.
$sql = "";
$un = mysql_fetch_array(mysql_query($sql));
$username = $un[''];
//Check to see if there is a page with that title in the system.
$sql = "SELECT ID FROM wp_posts WHERE post_title = '".$username."' AND post_status = 'publish' AND post_type = 'page' LIMIT 1";
$count = mysql_num_rows(mysql_query($sql));
if($count == 1){
//Change the username to a slug like the page
$page_slug = strtolower($profile);
$page_slug = str_replace(' ','-',$profile);
wp_redirect(site_url($profile));
}
else {
wp_redirect(site_url('id="http://mysite.com/trail1/profile/"')); //replace profile with your profile page slug
}
}
?>
|
|
Ok, Ram….so what now? lol
|
|
Hi, Dave:
I totally get the setting, but the issue is that since I take a method to impliment “Client Portal” system which taught by S2member tutorial video, so therefore my Login Welcome Page link: (for example)
http://mysite.com/%%current_user_login%%/
Can not change, if I do, the client’s private page will not be directed correctly and the whole system will be meaningless to me.
I wonder if there is anyway to change the login welcome page but without affect the Client Portal System I setup with?
Btw, the Client Portal Utilize the user name as a access tha automatically direct to it once login, though, I would prefer direct to the profile page (a costume page I created just to display profile related to the viewing user) instead.
Please help me out, thanks!
-
This reply was modified 4 years, 9 months ago by adam chen.
|
|
It raised my concern because what happened to PS3 site’s hacking while everyone’s info was stolen…yea.
|
|
Thanks, because I was wondering about the fact that all files in that folder is not really encrypted, are they? Can we do that to the folder with S2member ? because I am kind of unclear of “secured” term, I feel secured does not mean its encrypted, is that right?
|
|
Hi Sam:
I am more looking into simply pdf, words, excel, or zip file.
Are they really that secured in term of access? I wonder can anyone break into the files just by cracking the site or the one has to break into the server?
THank YOu
|
|
nvm, I customized member option page as a dummy welcome page to full registered users lol
|
|
yea, its a perfect answer and finally get me out of the deadly loop….back to the original setup lol
Thank you very much :) wish I coudld get you 10 starts :D
|
|
Hi , David:
I got it, so its actaully secured when a unregistered user login the page? I just wondering, because I kinda put the profile in that login welcome page, will it be secure?
I konw unregister will not access the content as I use the php code to appear differnet content when the user is unregistered.
here:
[s2If !is_user_logged_in()]
*This Page will only show content when you are registered user.
Please <a title="Register" href="http://testsite.mblbc.com/trail1/wp-login.php?action=register">register </a> or <a title="Login Page" href="http://testsite.mblbc.com/trail1/wp-login.php">login</a> to view additional content. Thank You!
[/s2If]
so what you think? do you think its secure enough for a user to edit the profiles in the login welcome page? Becasue I saw s2member desciribe the page as it will never prevent unregistered user from access this page……so thats why all these mess came up.
|
|
hi david, thanks again for your help.
First, I think I am not going to use Membership Option Page at all for now.
But is one more issue emerged.
Because there is a need for private area for the page for each user, so I setup the Login welcome page as the abc.com/%%current_user_login%%
But since its manually crated each area, so it turn out to be blank, and another funny issue is that: if I had a user with custom capability of useradam, then if 2nd user named useradam2, the blank page’s address will apear like abc.com/useradam, instead of abc.com/useradam2. I wonder if there is way to walk around it so that if the user does not have a user private page crated yet, it went back to home page, or if you could kindly hint me way to get the s2member to create that private page with corresponding custom capability filled once the user is created?
Thank a lot, you are the most helpful person in s2member community I ever met!
|
|
Anyone knows how to let login welcome page show register form if the one is not registered and got in the login welcome page?
|
|
Hi, David ( and whoever may care):
I think there is another issue:
When I actually get in the login Welcome page directly, it will not redirect me to the register page if I am not a registered user.
Also when I registered as a new user, after login, it also redirect me to the register screen….thats not right….
I wonder how could I fix that with that brilliant hook David wrote?
Anyone?
Thanks ahead!
-
This reply was modified 4 years, 10 months ago by adam chen.
|
|
Dummy issue…the text was white lol
|
|
But still it seem did not fix the issue of the login problem that brutal force restriction lock down only the ip? So does that mean that if two pc using same ISP but one is in ethernet and other is wireless, they all still have the same ip? Does that really true so that why what happened to me?
Anyone has idea about it, thanks.
|
|
wow, interesting way to explore it, thanks!
I am going to have a try of this hack later :D
|
|
Problem……….now
-
This reply was modified 4 years, 10 months ago by adam chen.
|
|
Hi David:
Thanks for the helpful hint agian!
I will try it out though I doubt I am able to manipulate tabindex since its a recapthca plugin rather than direct code implimentation.
However, I will see what I can do and post here again, but if you do konw how to deal with this situation, kindly post it will be really apreciated :)
Stay tuned
|
|
But, I did use two different computer—same network to access two different account, yet one is in ethernet one is using wireless.
So, does that still be the IP address issue? Just wondering.
-
This reply was modified 4 years, 10 months ago by adam chen.
|
|
oh~ thanks, let me see if it wokrs good, will reply you tomorrow, thanks for your kind help :)
|
|
Hi Eduan:
So, is it a configuration issue? But there is only 1 selection though, how could the lock suddenly apply to all users once my admin account is over tried? Also, what is someone just want to mess with the system, over try intentionally, our site will be compromised just like that isnt it?
|
|
Hi David:
I tried, but seem its not really work.
I did exactly the steps, but seem its not only not working, but also the original php code simply appear on the top of the page.
Is there something wrong or should I do some extra steps to apply the s2-hacks.php?
|
|
Hi, Eduan:
Sure.
I paste the code:
[s2Member-Security-Badge v="1" /]
into the page of Login Welcome Page (default page to show the user profile), in the page there are only two short codes:
[s2Member-Profile /]
[s2Member-Security-Badge v="1" /]
Thanks
|