UserCake 2.0
Results 1 to 6 of 6

Thread: UserCake 2.0

  1. #1
    Junior Member
    Join Date
    Mar 2010
    Posts
    23

    UserCake 2.0

    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

  2. #2
    Settled 4 red convertible dalecosp's Avatar
    Join Date
    Jul 2002
    Location
    Accelerating Windows at 9.81 m/s....
    Posts
    7,623
    Are you missing the "global" keyword on line 58 of said file?
    /!!\ mysql_ is deprecated --- don't use it! Tell your hosting company you will switch if they don't upgrade! /!!!\ ereg() is deprecated --- don't use it!

    dalecosp "God doesn't play dice." --- Einstein "Perl is hardly a paragon of beautiful syntax." --- Weedpacket

    Getting Help at All --- Collected Solutions to Common Problems --- Debugging 101 --- Unanswered Posts --- OMBE: Office Machines, Business Equipment

  3. #3
    Senior Member
    Join Date
    Sep 2011
    Posts
    258
    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

  4. #4
    Senior Member
    Join Date
    Aug 2008
    Location
    London, UK
    Posts
    753
    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
    www.ashleysheridan.co.uk

  5. #5
    Pna lbh ernq guvf¿
    Join Date
    Jul 2004
    Location
    Kansas City area
    Posts
    19,353
    Quote Originally Posted by Ashley Sheridan View Post
    I would definitely expand on that function a bit
    I wouldn't; I'd get rid of it altogether and instead use filter_var().

  6. #6
    Senior Member
    Join Date
    Aug 2008
    Location
    London, UK
    Posts
    753
    Quote Originally Posted by bradgrafelman View Post
    I wouldn't; I'd get rid of it altogether and instead use filter_var().
    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.
    Ashley Sheridan
    www.ashleysheridan.co.uk

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •