• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
User Auth with Private Function

#6
[eluser]Phil Sturgeon[/eluser]
[quote author="johnmchilton" date="1183409938"]Thanks. I'm taking your advice, but just for my knowledge (or whomever else is reading), why specifically was my first method bad?[/quote]

Basically you want as little code repetition as possible. You also want no hard-coded settings. All options should be in sensible places and your newest code is an example of this.

I was proposing either a database or a /config/permission.php with such arrays in them, but this is one potential method and not one you have to use. There is little point in setting the array directly over the IF statement though.


Messages In This Thread
User Auth with Private Function - by El Forum - 07-01-2007, 06:07 PM
User Auth with Private Function - by El Forum - 07-02-2007, 04:57 AM
User Auth with Private Function - by El Forum - 07-02-2007, 05:28 AM
User Auth with Private Function - by El Forum - 07-02-2007, 09:58 AM
User Auth with Private Function - by El Forum - 07-05-2007, 11:33 PM
User Auth with Private Function - by El Forum - 07-09-2007, 05:16 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.