Create a change password page - redirect

I have added a plugin called "force password" which will force members to change their password on their first login.
However, because I redirect the users to a profile page I have done myself, I don't want them to be redirected to the dashboard or to be able edit my profile page.
Instead, I want a screen to popup with a "change my password" box or a change password box to be loaded on a similar page as the login page. After they change their password they will be logged into their profiles.

I'm not sure what your question is, but what you need to do is to hook into the wp init action that runs when a request starts. There you can check if the password has changed, put up the form, check the post values and do your redirects.
Redirects must be done in the init before Wordpress starts writing to the response.

Related

Redirect to page after successfully entering in information in Squarespace

I have a page in Squarespace that I only want viewable after someone inputs their contact information. For example, I would create a Form Block, and then direct them to the otherwise locked page so they can view for that session. But if they close the window, they would need to re-enter their information (Name + Email).
lets say the address to the otherwise unviewable page is www.website.com/access
Once the viewer puts in their Name + Email and hit submit, they can see the /access page. If they do that and say share the address with someone who has not entered in their information, then they would get the Form Block where they need to enter their information.
Is there a way to do this in Squarespace? Would that need to be done with some sort of PHP Session that can be injected into the header of the specific page?
Ideally it would be like if they could see the page which is normally hidden, but of course unless they are an admin, the page is not viewable to the public.
Squarespace doesn't support PHP since it uses JSON template, so you can't create a session there. Please refer to this page: https://support.squarespace.com/hc/en-us/articles/205815358-Custom-code-FAQ
The only option to achieve this will be to create a cookie via JS and redirect if there is no cookie. The page will be still accessible if you turnoff the JS.
Please have in mind that SquareSpace is very limited when it comes to this kind of changes.

moodle first time login redirect to custom page

I have moodle site with custom signup page when new user register user redirect to the home page but then it automatically redirect to the profile edit page which is at(http://www.test.con/user/edit.php?id=46&course=1) once i update profile i can go to home page.so i want to stop this and redirect to home page.
The automatic redirect happens when a user has required fields in their profile that still need to be completed.
Maybe you could make all required profile fields required fields in your custom signup page too, then users will always have completed them already by the time they log in for the first time.
I think it is related to the configuration of "Default home page for users":
Go to Site Administration => Appearence => Navigation
Select other option other than "User preference".
Hope that helps!

JSF 2 redirect to first page on back button or URL copy paste (no Authentication involved)

I have a JSF 2.0 application that is used for creating accounts using Self Registration. On the first page, there are fields like name, email, uid etc. Typical to any registration, we show the confirmation page, (other custom pages as well in between) and the final success page. Each page is rendered in JSF using the faces-redirect=true so there are 3-4 pages(facelets) in the entire process. In this application, I use a SessionScoped backing bean to show the middle pages/confirmation page/final page etc. After the registration is complete, I clear the SessionScope bean from session and invalidate the session.
The problem is:
The confirmation page/middle page etc. show the User details that the User entered from the first page(using the EL from the backing bean: #sessionBean.firstName etc.). So, if the User enters this URL in the browser directly (host/appName/confirmationPage.xhtml), the page loads with blank values (as the User did not go to the first page directly). Also, after the registration is complete, if the User clicks on the back button blank values show up (no-cache is explicitly set in the filter class, so cache is not used here which is the correct behavior)
How do I force the User to go to the first page if the firstName etc. is not present. i.e. when the User lands up on a page, make sure that User landed on this page only through the first page in this session?
Should a filter class be used? Or should a prerenderview event be used to check for blank values and redirect them to the first page? There is no "User Login" here as there is no authentication. I believe this is a common use-case and I would like to know if there is any best practice in JSF

Expressionengine 2 Login screen on Front Page

I would like to create a login screen for registered members on front page of the site without using members module. As I can see I can create a member and assign login credentials at back-end ( I don't have member module). Basically the idea is:
visiting: www.domain.com will give you login screen. When logged in it will redirect you or open new page.
I'm not looking to buy a module or extension. If something already exist I will be happy to use it.
Can anyone help?
You "don't have the members module"? How is that possible - it comes with the default install! So, something does already exist - it's called the Login Form tag.
So is the question how to create a login form on the front end of the site, or how to keep non-logged in users from viewing a specific template?
If it's the latter you can set access privileges at the template level. Look for the "Access" link by each template in the Template Manager, click that and you'll see your member groups and an option for what template to display if they aren't logged in. Typically that's a login template using the Login Form tags mentioned earlier.

on wicket's continueToOriginalDestination() method

what is the link between backbutton and continueToOriginalDestination(). method.
how to keep url saved for continueToOriginalDestination() method while clcking browsers back button.
continueToOriginalDestination() is used when a request was (temporarily) redirected to an intercepting page, for example a login page. When a user requests a secured page but is not yet authenticated, the security framework that hooks into wicket (auth-roles, shiro, swarm/wasp) will present the user with a login page, and store the original URL. When the user has authenticated, you can call continueToOriginalDestination and Wicket will process the original request, displaying the requested secured page.
Not only security frameworks can use this, you can do it yourself by throwing a RestartResponseAtInterceptPage exception.
The back button has nothing to do with this, nor does it have any affect on the processing of the original destination page. Wicket keeps storing the original destination until a new one is set, or until continueToOriginalDestination has been called.
continueToOriginalDestination returns true when there was a page to go to, and false when the user landed on the intercept page directly (e.g. guessing the login page URL or clicking on a link pointing to the login page).