Hey Everyone,
I'm looking for feedback on a fairly substantial bit of code today. It's called UserCake, and it's meant as a simple frame work for sites requiring user management and limited access pages. I didn't start it, but it's been around for a while, and I've taken over running the project. We've just got it to the point where we're Beta Testing 2.0 -- and that's what I'm asking you all to look at.

If you don't have time to look through the entire code base, I'm particularly interested in feedback on the functions file. models/funcs.php

http://www.usercake.com/release.php

    Are you missing the "global" keyword on line 58 of said file?

      18 days later

      This actually look quite good at this point, I'd like to see what I can learn from it and hopefully improve my own user system. XD

        Looks like you've fallen into the trap of using regular expressions for email validation. The isValidEmail() function doesn't even validate the fairly popular 'forename.surname@somedomain.co.uk' address format (particularly common in large organisations/universities/etc, where people will have common names), let alone some of the more complicated and perfectly valid ones. I would definitely expand on that function a bit, and try to refer to the email format RFCs when you do update it.

          Ashley Sheridan;11012623 wrote:

          I would definitely expand on that function a bit

          I wouldn't; I'd get rid of it altogether and instead use [man]filter_var/man.

            bradgrafelman;11012649 wrote:

            I wouldn't; I'd get rid of it altogether and instead use [man]filter_var/man.

            Keep the function as a wrapper for it, as that allows you to easily expand the function later, such as to allow a check on the domain for validity, or see if the email responds to a HELO request.

              Write a Reply...