DroidHost Well-known member Jan 12, 2012 #1 Call back in custom user Field can any body give me an Example for using such a feature because I cannot understand it
Call back in custom user Field can any body give me an Example for using such a feature because I cannot understand it
Jake Bunce Well-known member Jan 13, 2012 #2 I don't see it documented anywhere. It really should be. But I figured it out. An example is attached. Once you have uploaded the files then you need to specify the callback for your profile field: Then edit the code: library/Callback/UserField.php It has a basic skeleton you can use to validate the value of a profile field: Code: <?php class Callback_UserField { public static function validate($field, &$value, &$error) { if ($value == '123') { return true; } else { $error = 'what no'; return false; } } } Attachments UserFieldCallback.zip UserFieldCallback.zip 3.3 KB · Views: 8
I don't see it documented anywhere. It really should be. But I figured it out. An example is attached. Once you have uploaded the files then you need to specify the callback for your profile field: Then edit the code: library/Callback/UserField.php It has a basic skeleton you can use to validate the value of a profile field: Code: <?php class Callback_UserField { public static function validate($field, &$value, &$error) { if ($value == '123') { return true; } else { $error = 'what no'; return false; } } }