TankAuth: Checking user age as a callback function |
[eluser]Unknown[/eluser]
I have added date of birth to the registration process for tankauth. The way I did it was 3 fields dob1, dob2, dob3 (mm,dd,yyyy). What I want now is to use a callback function to check to see if the user is 13 years or older before they can register. This is what I have attempted so far: NOTE: This is how I implemented the date of birth if it helps/ if anyone wants to know: http://stackoverflow.com/questions/12379...rth-issues inside the register() function: Code: $this->form_validation->set_rules('dob1', 'Date of Birth Month', 'trim|required|xss_clean|exact_length[2]'); and this is my callback funtion: Code: //Check if user is old enough Right now it acts as if the callback is not even there. Any help?
[eluser]Unknown[/eluser]
I have actually figured out my issue. It was a combination of errors, but mainly a logic error. Checking if it was < when I should be checking if it was >. Here is my final solution (for now): Code: //Check if user is old enough Code: $this->form_validation->set_rules('dob1', 'Date of Birth Month', 'trim|required|xss_clean|exact_length[2]'); |
Welcome Guest, Not a member yet? Register Sign In |