Redirect advice |
Hey folks!
I added this forum script to my site: http://www.phpcmsframework.com/2014/05/c...r-and.html The issues I have with it is: 1. It comes with login/register but I have those already implemented..how do fix or redirect so that folks can easily go into forum when they are within the site(no second logging or registering) 2. I want to make myself and another person admin..how to give ourselves admin privileges not only for the forum but in general? I have 90% of the site done so is it too late to place admin privileges within the site? If these are stupid questions I'm sorry..thank ya kindly , Mekaboo
CIBB redirects to 'user/join' if the user isn't logged in. I.e. if $this->session->cibb_user_id is not set.
You can create a route in application/config/routes.php to route requests for 'user/join' to your own controller/method for the user to log in. Example: PHP Code: $route['user/join'] = 'myapp/login'; To give yourself and other users the administrator role, look at how CCIB is doing this. Check the ccib.sql file. You will find a table named "ccib_roles". In the "ccib_users" table, each user has a role_id. On login, the application loads the privileges for the user's role into the session. If a privilege is set to 1, it is active. (09-29-2019, 06:12 AM)Wouter60 Wrote: CIBB redirects to 'user/join' if the user isn't logged in. I.e. if $this->session->cibb_user_id is not set.Thank ya so much for this great info |
Welcome Guest, Not a member yet? Register Sign In |