Welcome Guest, Not a member yet? Register   Sign In
freakauth with separate login areas
#1

[eluser]bugboy[/eluser]
just wondering if easy enough to create separate login area for certain types of users?

For example I have a backend system using FAL. But I want an area in the front end that uses FAL but doesn't route through the same backend one.

Cheers
#2

[eluser]Grahack[/eluser]
Hi Bug,
I'm not sure to understand.
One single login form, that redirects to different pages (backends if you want) ?
Maybe you should hack this part of FAL_front.php, around line 238.
Code:
switch ($role)
                {
                    case ('superadmin'):
                    case ('admin'):
                        // On success redirect admin to default page
                        redirect($this->CI->config->item('FAL_admin_login_success_action'), 'location');
                        break;
                      
                    default:
                        // On success redirect user to default page
                        redirect($this->CI->config->item('FAL_login_success_action'), 'location');
                        break;
                }
Maybe we should put a config array, with a page to redirect to for each role, not only one for admins, and another one for other users.
#3

[eluser]bugboy[/eluser]
I think you sort of have it. (what you have suggested though would be fantastic).

What I'm asking is. Say you two types of users? Admins and dealers.

The admins can admin the site using a custom backend and login.

The dealers only the dealer area.

Now I want them to both use FAL system as its great but I don't want the dealers to see what the admin see's so login in using a different area and login screen?

I thought that extending fal_front would be the way but don't know where to start.

Hope that makes more sense.
#4

[eluser]Grahack[/eluser]
[quote author="bugboy" date="1208051993"]I think you sort of have it. (what you have suggested though would be fantastic).
[/quote]
I created a ticket for it (not saying it will be implemented tomorrow...).
Quote:What I'm asking is. Say you two types of users? Admins and dealers.
The admins can admin the site using a custom backend and login.
The dealers only the dealer area.
Now I want them to both use FAL system as its great but I don't want the dealers to see what the admin see...
I guess you already use $this->freakauth_light->check('admin'); and $this->freakauth_light->check('dealer'); to protect the admin area and other areas.

To me, what you just need is a different redirection after a successfull login, as we'll have some day.

Quote:...so login in using a different area and login screen?
This is what I think I don't understand. Why do you need different login forms? How can you display different forms if you don't know who browses (not authenticated yet)?
Quote:I thought that extending fal_front would be the way but don't know where to start.
Have a look at Dan's tutos. Not sure FAL_front is extendible.
#5

[eluser]bugboy[/eluser]
wicked cheers dude. Any help I can do?

I need two different login forms one for dealers and one for admins.

The admin one will be take you to backend but won't be shown on front of site as it allows access to a custom cms. The dealer one can be seen on front of site and well look the same as the front of site. They need to look different because the dealers won't know about the admins.

I think you can extend FAL_front.




Theme © iAndrew 2016 - Forum software by © MyBB