public function preview_onImpersonateUser($recordId)
    {
        if (!$this->user->hasAccess('rainlab.users.impersonate_user')) {
            return Response::make(Lang::get('backend::lang.page.access_denied.label'), 403);
        }

        $model = $this->formFindModelObject($recordId);

        Auth::impersonate($model);

        Flash::success(Lang::get('rainlab.user::lang.users.impersonate_success'));
    }
public function preview_onImpersonateUser($recordId)
    {
        if (!$this->user->hasAccess('rainlab.users.impersonate_user')) {
            return Response::make(Lang::get('backend::lang.page.access_denied.label'), 403);
        }

        $model = $this->formFindModelObject($recordId);

        Auth::impersonate($model);

        Flash::success(Lang::get('rainlab.user::lang.users.impersonate_success'));
    }
public function preview_onImpersonateUser ( $ recordId ) { if ( ! $ this -> user -> hasAccess ( 'rainlab.users.impersonate_user' ) ) { return Response :: make ( Lang :: get ( 'backend::lang.page.access_denied.label' ) , 403 ) ; } $ model = $ this -> formFindModelObject ( $ recordId ) ; Auth :: impersonate ( $ model ) ; Flash :: success ( Lang :: get ( 'rainlab.user::lang.users.impersonate_success' ) ) ; }
Impersonate this user
Impersonate this user