This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

scottstone72
scottstone72

Hi all,

Got a problem that is just stumping me. Looked far and wide for an answer, the few answers I found on this forum are not working for me.

What I want to do is allow a logged in backend user the ability to view certain items (eg. buttons, blocks of code, etc.) on frontend pages like edit buttons that link to some backend relevent section where I want to direct them to. I do not want to use the RainLab.Users plugin for this, i think it would be a serious pain to the admin to have to have 2 accounts, login for backend and login for front. If I used the RainLab.Users plugin to do this the admin would have to sign out of backend and then sign into frontend just to view any restricted elements like edit buttons that I have on the frontend pages.

I have tried this in the code sections of a page and a partial but get errors or nothing at all.

use BackendAuth;

function onInit(){
      $this['admin'] = BackendAuth::getUser();
}

This is one of the things I tried. Seems like other people have tried using this and it works for them. Not for me though.

Any ideas anyone?

Last updated

1-1 of 1

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.