Results 1 to 2 of 2

Thread: Redirecting users to custom Dashboard based on User role

  1. #1
    Thread Starter
    Veteran Fanatic's Avatar
    Join Date
    Jul 2010
    Location
    Canada
    Posts
    885
    Thanks
    309
    Thanked 57 Times in 51 Posts

    Question Redirecting users to custom Dashboard based on User role

    This is an extended mod for Redirecting users based on their roles, I'm missing the code in the tpl-dashboard.php file to complete this mod.

    I'm using Members plugin to assign a default role named (Viewers) to those looking to contact the advertisers on the site (Contact tab is displayed to logged in members only).

    I also used the plugin (Peter's redirect plugin) to force those type of users (Viewers) to be redirected to a custom tpl-viewers.php (stripped out the links to post ads in the custom sidebar (sidebar-viewers.php) that I have also created.

    Now, everything works great, Viewers login to the site and are automatically redirected to www.site.com/viewers where the Viewers template is loaded (allowing them to update their basic profile if need be) while Contributors are logged in to the default Dashboard allowing them to post ads.

    The problem is the Dashboard link in the top menu, I need to implement a code (I think it should go in the tpl-dashboard.php) that will identify the User role and pending on that user role to redirect them back to www.site.com/viewers if they are set as "Viewers" or default link www.site.com/add-new if they are set as "Contributors".

    Anyone have any idea or tried implementing such a modification?

  2. #2
    Thread Starter
    Veteran Fanatic's Avatar
    Join Date
    Jul 2010
    Location
    Canada
    Posts
    885
    Thanks
    309
    Thanked 57 Times in 51 Posts

    Unhappy

    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 6
    Last Post: May 10th, 2015, 01:19 PM
  2. Users with contributor role can't view see the admin panel properly
    By yasmall in forum Report ClassiPress Bugs
    Replies: 4
    Last Post: April 11th, 2012, 01:02 AM