[eluser]Bacteria Man[/eluser]
I'm developing an authorization function which will return multiple failure values. In other words not just true/false.
To reduce overhead the query string includes a couple of left joins to return all the required data in one pass. If the foreign keys do not exist, the corresponding fields will equal null. Depending on which field is null will determine where the authorization fails.
In the past (using other platforms) I've devised a list of error codes. For example:
-100, that group does not exist
-200, you are already a member of this group
-300, you are not allowed to join this group
The function will return true if all of the conditions are satisfied.
There's nothing complicated about this, but what's the best way to about it using Code Igniter? Is there anything in the core that would make this more efficient and/or easier to implement?
Thanks in advance.