Jump to content

Stop access Index page!


Dhush

Recommended Posts

Hi,

 

Is there a way to stop accessing admin index page from my staffs.

I don't want them to know the status of my system, so can set alternate page or some thing else.

I know i can do this in role settings, but there is noway to hide side bar.

I want everything to hide on my index.

 

Thanks.

Link to comment
Share on other sites

@sentq, how can i redirect admin to specific page after login?

 

 

create new file in /includes/hooks/ folder, name it "adminlogin.php", and put the following code inside it:

 

<?php

add_hook("AdminLogin", 1, function($vars){

   $adminIDs = array(1, 3, 4);
   $redirectTo = "reports.php";

   # Check For Specific Admin IDs
   if (in_array($vars['adminid'], $adminIDs)){
       # Now Redirect
       header("Location: ".$redirectTo);
   }

});

 

$adminIDs has list of admin IDs, if logged-in admin is one of those, then he will be redirected to the URL specified in $redirectTo

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated