Ask the community

This is a community support forum where you can ask
questions and interact with other PremiumPress Customers.

Login Redirect conflict

  • Roberto
    Newbie 0 points
    July 18, 2013 at 2:51 am

    Hello. I need a specific role in my site (das_designer) to be redirected to a specific page. I downloaded
    since it does what I need (login redirect based on user role).

    I found that this plugin works perfectly with my Shopperpress theme disabled but when active it doesn’t work. I found the reason is because the theme already redirects ALL users (except) admins to “my-account” and it is conflicting with the plugin.

    I chatted with support (Zarco who is the best there) and advised me to add the following code elseif($user->user_level > 3){
    $redirect_to = admin_url().”edit.php?post_type=designapprovalsystem”;
    on line 692 of PPT/framework/ppt_core.php


    I need the “das_designer” role redirected to

    Please help or advise the right code and where I need to add it. Thanks

  • Mark Fail
    Mark Fail
    Super Guru 12,820 points
    July 23, 2013 at 3:43 am

    this would need to be customized, i suggest posting on the jobs board;

  • Richard Bonk
    Richard Bonk
    Super Guru 2,739 points
    July 23, 2013 at 11:11 am

    Roberto, the code snippet that you have shown is not checking for the user role, but for user level.

    Kind regards,

    Wide range of PremiumPress and WordPress Plugins and add-ons
    PremiumPress customisation services and Website Design
    Selection of PremiumPress Child Themes

  • Luhan Waththa
    Senior Member 161 points
    July 23, 2013 at 11:20 am

    Use this:

    $cu = wp_get_current_user();
    if ($cu->has_cap("das_designer")) {
    $redirect_to = admin_url()."edit.php?post_type=designapprovalsystem";

  • Mark Fail
    Mark Fail
    Super Guru 12,820 points
    July 23, 2013 at 1:47 pm


Viewing 5 posts - 1 through 5 (of 5 total)