Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14348

Loading a controller through an automatic condition

$
0
0
Hello everyone,

I have this problem, I have the same app that is being used by different entities, but I need to load different methods based on the user.

So, let's take this as an example:

User A is from California.
User B is from Minnesota.
User C is from Mexico.

User A have a specific way of displaying the user profile based on information that is available to him and only to him.

What I need is to have the three of them call the /users/profile/$id method, but CodeIgniter should check first if there exists a /a/users/profile/$1 before loading. It if exists, then load that, else load the default method.

Doing this on a regular condition (if else) is not an option because that would be a pain when there are over 70 users.

I know wireddesignz already does this with his modular expansion library, but I have no idea of how to achieve it.

Please help.

Thanks.

Viewing all articles
Browse latest Browse all 14348

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>