php - PyroCMS form handling -
i modify required fields registration , edit-profile forms in pyrocms.
unfortunately cannot find code form handling (the part required fields passed).
can point me it?
thanks.
assuming using pyrocms 2.2.3 community :
the "edit-profile" form handled users module.
- view :
system/cms/modules/users/views/profile/edit.php
- controller
system/cms/modules/users/controllers/users.php
, methodedit
(line 649).
at beginning of code, can see validation rules.
$this->validation_rules = array( array( 'field' => 'email', 'label' => lang('user:email'), 'rules' => 'required|xss_clean|valid_email' ), array( 'field' => 'display_name', 'label' => lang('profile_display_name'), 'rules' => 'required|xss_clean' ) );
email
, display_name
"hard coded" profile fields , natively handled users module. rest "soft" fields, mean can added/removed/edited site admins control panel. these "soft fields" handled streams core api. means don't have manage them in code.
all metadata of streams stored database. 3 tables involved : default_data_streams
, default_data_field_assignments
, default_data_fields
, default
prefix of site.
if want add custom profile fields connect admin, go control panel > users tab > users > profile fields
click "add user profile field". you'll have form can tell if field unique , required. rest of validation handled streams.
if need programmatically, see developers docs of streams core api.
helpful links :
Comments
Post a Comment