Logs in to home page drupal 7 - drupal-7

I have installed the user module in Drupal 7. How could do that when the user logs in redirect to the home page ?
thanks

I suggest two options. You could use Login redirect module or you could use Rules module and set a rule reacting to event user login and performs page redirect action. If you want, you can also filter the redirection destination by role adding a condition to the rule

Related

Protected routes in next js

I have two types of user . when user login i need to redirect them based on their role . Also protect routes. Only login user can go to specific routes based on their role. how this can be done in next js
You can get the auth token and create a serverSideProps https://nextjs.org/docs/basic-features/data-fetching/get-server-side-props to redirect the user by role.
when the user logs into your app, you can save his permission in cookies and then get his permission via serverSideProps, and render the page according to the user.

Drupal 7 SSO via simplesaml_auth module

Currently developing a SSO method for my Drupal website. I've installed simplesamlphp successfully and also configured it. I have also installed the simplesaml_auth module on my website and the SSO procedure works fine. The only problem I am having is when a user logs in via the SSO method I need to redirect them to a certain page when login is successful and I am not sure where to edit the code to be able to do this.
Any help is welcome.
Thanks!
You can add redirect condition wise in below function of simplesaml auth module
simplesamlphp_auth_loginpage() {
change drupal_goto path here to set new redirect.
}
Add a destination menu item id query parameter in the SAML login url to which it should b redirected after successful login.
Generally the SAML menu item is saml_login which makes the SAML login url like https://[SITE_NAME]/saml_login now just add it a destination query parameter like https://[SITE_NAME]/saml_login/?destination=after_login
Where after_login should be a custom menu_item defined in any of the custom module containing the callback function for redirection.
If needed any existing menu item of core or contributed module can be also used in the destination.

Drupal 7 not showing frontpage?

I am a new Drupal CMS application developer, I have create redirect function using redirect, trigger module and integrate succefully. The page redirect direct to login working fine. The trigger action create after user logged in redirect to frontpage. Trigged was showing user page, but the not showing frontpage.
The below configuration in my Drupal site:
redirect module - redirect from frontpage to user login page
system - action - choose action - redirect to - frontpage[site:url] assign available token
goto structure trigger - user tab - after user logged in - assign to action funtion
redirect module can be replaced with R4032Login (Redirect 403 users to login page eg.)
Don't rebuild the wheel, use it :D

Websphere portal session timeout redirect

In my websphere portal 8 I need to redirect user to custom page after session timeout.
As was described in all tutorials I set
redirect.logout = true
redirect.logout.url = /wps/portal/uec/uechidden/sessiontimeout
in WP_ConfigService but that had no effect.
I have check all access permissions to redirect page and portlet and other.
Also I have Logout filter in my app, but even when I removed it I've been redirected to "Your portal session has timed out because of no activity. Please start a new session at your portal Home."
My timeout settings are set for server not for one application.
Any suggestions?
To redirect to the login page (or any other page) when the session expires, use one of the following methods:
Option 1.
Extend the authentication filter chain and implement the desired logic in code. Refer to the following articles for more information: "Configuring authentication filters" and " New security APIs in WebSphere Portal".
Option 2:
Modify the ErrorSessionTimeOut jsp to add Java script to redirect to the login page when the session times out. This option is simpler to implement but you may see a momentary "flash" when the redirect occurs.
More information: http://www-01.ibm.com/support/docview.wss?uid=swg21419230
To redirect the user to custom page after session times out, you need to perform following steps.
Define ImplicitLogoutFilter by implementing com.ibm.portal.auth.ImplicitLogoutFilter.
While defining ImplicitLogoutFilter, set the the redirect url in filterChainContext using method:
filterChainContext.setRedirectURL("URL of custom page where user should be redirected to");
Configure this filter in web sphere.
In WP_ConfigService, create a new custom property redirect.logout=true
Restart the server.
Follow these steps, it works when session times out and user try to view authenticated page. In case any issue is faced, please let me know. I'll help you in resolving this issue..

Cakephp Auth component, Multiple User Role sessions in same browser

I am using Cakephp 2.0 and Auth Component. My website consists of 2 user roles as follows
1. Admin
2. User
At a Time in a Browser either Admin or User can login to the website using Auth Component. it's not possible to handle Both User roles can log into the website at the same time in same browser. Is there any way to do it CAKEPHP. Now My client wants to login as Admin and User in same browser. But in Joomla and other frameworks has this feature. extremely sorry for this basic question
Depends on how your roles are defined and how your admin section is built. If you done it with proper prefix routing (/admin/:controller/:action/) then it is easy.
In you AppController::isAuthorized() just add a check like
if ($this->Auth->user('is_admin') == 1 && $this->request->params['prefix'] == 'admin') {
return true;
}
If you have an array of rules use in_array() to check for the allowed roles.
For more details read this link.

Resources