Download presentation
Presentation is loading. Please wait.
Published byCori Campbell Modified over 8 years ago
1
Drupal Recipe – Login Destinations Chris Neglia & Lisa Forgan Copyright 2009, Page 1 Solutions LLC
2
LoginToboggan and Login Destination Install LoginToboggan module Install Login Destination module Enable them in site building > modules
3
LoginToboggan It changes the login system so that users can login with username or email address. It allows users to login instantly with a specific role (default: authenticated user) It allows you to set a (semi) dynamic url to direct people upon registration to a specific page. (Ex: user/%uid -> takes them to user page.)
4
Login Destination Allows you to set a destination to take people upon login using either a static url or custom PHP code. Custom PHP code means you can take users to a specific page based on the role or other characteristics available to the user. Allows you to set a specific context (page from which you are loggin in) for directing people to different areas. Note that this last point is somewhat limited.
5
Where Settings are Located User Management > LoginToboggan User Management > Login Destination
6
Example Login Destination Code // // mcn – 7/27 – this code will direct the user to different ‘profiles’ depending on their roles. // global $user; $url = 'user/'. $user->uid. '/profile'; foreach ($user->roles as $role_name) { switch ($role_name) { case 'dentist' : return $url. '/profile_dentist'; case 'dental vendor' : return $url. '/profile_vendor'; case 'dental patient' : return $url. '/profile_patient'; case 'dental team member' : return $url. '/profile_team'; case 'student' : return $url. '/student_profile'; default : continue; } return $url;
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.