We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Redirect user to custom page on restriction | Forum

Alex Kh
Alex Kh Jan 6 '14
Hello

I want redirect user(logged in) to the custom page if he/she not allowed to see profiles for example. So instead of displaying "You are not allowed to view profiles" i want redirect him to http://www.mydomain.com/upgrade-membership

tnx
The Forum post is edited by Alex Kh Jan 6 '14
Daisy Team
Daisy Mar 10 '14
Alex, if you want to change this functionality behavior on the whole site, you should make changes for every plugin installed. For instance, you can change the redirect (on the view action) for the Blogs plugin in this file:  

/ow_plugins/blogs/controllers/view.php

Search for the index function and change the$this->setTemplate method to $this->redirect.

For example:
$this->redirect(OW::getRouter()->urlForRoute('ROUTE'));

The Forum post is edited by Daisy Mar 10 '14