So far I found 3 references to the webuser password length:
manager/includes/document.parser.class.inc.php
line 2239
manager/processors/save_web_user.processor.php
line 106
assets/snippets/weblogin/websignup.inc.php
line ~96
Create a new plugin named whatever you want, check the following events on the services tab:
OnWUsrFormRender
OnWUsrFormSave
$e = &$modx->Event;
switch ($e->name) {
// web users
case 'OnWUsrFormRender':
$company = $modx->db->getRow($modx->db->select("*", $modx->getFullTablename('web_user_settings'), "webuser='".$id."' AND setting_name='company'", "", "1"));
// $_SESSION['webUsrConfigSet']['company'] => Company Name
echo '
<table border="0" cellspacing="0" cellpadding="3">
<tr>
<td nowrap class="warning"><b>Company Name</b></td>
<td><input type="text" name="company" class="inputBox" value="'.$company['setting_value'].'"></td>
</tr>
</table>';
break;
case 'OnWUsrFormSave':
//$mode
//$id
// note that if company input field is cleared during edit and saved, record will automatically be removed from the database
if($_POST['company'] !=''){
// check if web user has a setting already in the database
$c_count = $modx->db->getValue($modx->db->select('count(*)', $modx->getFullTablename('web_user_settings'), 'webuser="-'.$id.'" AND setting_name="company"'));
if($c_count == 1){
// if a record is found, update the record
$fields = array(
'setting_value' => $modx->db->escape($_POST['company'])
);
$update = $modx->db->update($fields, $modx->getFullTablename('web_user_settings'), 'webuser="'.$id.'" AND setting_name="company"');
}else{
// insert a new setting for the user
$fields = array(
'webuser' => $id,
'setting_name' => 'company',
'setting_value' => $modx->db->escape($_POST['company'])
);
$insert = $modx->db->insert($fields, $modx->getFullTablename('web_user_settings'), 'webuser="'.$id.'"');
}
}
break;
default: '';
return;
}
You should now be able to view/edit the Company Name, found at the bottom of the Photo tab.
Front end usage:
$_SESSION['webUsrConfigSet']['company']