Firefox PHP

How to disable some user functions?

Posted by remouk 
How to disable some user functions?
October 11, 2013 08:13PM
Hi there,

I'm integrating Phorum with my website. It's very well done, I easily managed to login from my website and create the user on the fly if needed, etc. Then I disabled registration, login and logout from Phorum, the same way it's done in the External Auth. plugin.

But I don't understand how to disable other things that will mess with the integration: "change password" for example, "change email", etc. I don't want the users to change it in Phorum, they should do it in my website.

Can anyone give me a hint on how to achieve that? Thanks a lot!

Edited 2 time(s). Last edit at 10/11/2013 09:32PM by remouk.
Re: How to disable some user functions?
October 12, 2013 01:15AM
One idea, given I doubt there is a hook everywhere you would need, would be to put the following near the top of the files that you don't want your users accessing:
Language: PHP
phorum_redirect_by_url(phorum_get_url(PHORUM_INDEX_URL)); exit();
Add it after the phorum stuff is included but before what you don't the user accessing. Then if the user tries to access forbidden stuff, they will just get redirected to the index page.

Look at the top of profile.php to see how it is done. HTHs.
Re: How to disable some user functions?
October 12, 2013 01:31PM
Understood. So this + hiding the links in the template should be enough. I'd prefer not touching the Phorum files but I guess I'll have to.

Thanks for the tip!
Sorry, only registered users may post in this forum.

Click here to login