Welcome Guest, Not a member yet? Register   Sign In
Redirect advice
#3

(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.
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'
In your own login script, you'll have to set the cibb_user_id in the session, on succesful 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.
Thank ya so much for this great info Heart
Reply


Messages In This Thread
Redirect advice - by Mekaboo - 09-28-2019, 02:00 PM
RE: Redirect advice - by Wouter60 - 09-29-2019, 06:12 AM
RE: Redirect advice - by Mekaboo - 09-29-2019, 02:16 PM



Theme © iAndrew 2016 - Forum software by © MyBB