Secured Page Requires Login

Requirements:

On a public Drupal site, have one secure Board Member portal page with a list of PDFs.

To access the page, you need to be a Member, and login with a generic username/password issued by the Drupal Admin.

From the Board Member's view:

They go to www.companysite.com/login, and once logged in, they're redirected to the Board Member Portal.

What's the best approach to achieve this?
sandshakimiAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Aaron FeledyDrupal Developer and ConsultantCommented:
You could create a role called Board Member and assign it to certain user accounts. Then, using the Rules module, you can create a rule that runs when a user logs in. You can add a condition to check that the user belongs to that role. Then add an action to redirect them to your specific page. Then whenever a user logs in, if they have the Board Member role, they will be redirected to your board members page.
0
HagayMandelCommented:
The simplest way utilizing Drupal's core only. will be consisted of 2 phases:
1. Create a content type that contains the private board member portal page.
2. Use Actions & Triggers to redirect a logged in user to the specific page.
You need to take in consideration indexing, and use robots.txt settings to prevent spiders from indexing/follow/etc.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
oliverpoldenCommented:
Just use the login toboggan module
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

nanharbisonCommented:
Or create a content type and a role type and give that role permission to view that content type. And you need the redirect so board members are taken to that page.
0
sandshakimiAuthor Commented:
Hagay, if I used Actions + Triggers, can I specify that only Board Members logging in should be  redicted to the portal page, and not other authenticated Users?
0
HagayMandelCommented:
I guess you'll need to use the hook_user_login function:
Something like this (not tested!):

function hook_user_login(&$edit, $account) { 
  if (in_array('member', $account->roles, true)) { // Where "member" is the role as defined in roles
    $_GET['destination'] = 'node/12345';
  }
}

Open in new window

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Drupal

From novice to tech pro — start learning today.