Skip to content
Snippets Groups Projects
Commit c9aa00f5 authored by Jared Hancock's avatar Jared Hancock
Browse files

Fix error for new agents with very short email mailbox names

parent da702fca
No related branches found
No related tags found
No related merge requests found
......@@ -3715,8 +3715,8 @@ class FreeTextField extends FormField {
class FreeTextWidget extends Widget {
function render($options=array()) {
$config = $this->field->getConfiguration();
$class = $config['classes'] ?: 'thread-body'
?><div class="<?php echo $class; ?>" style="padding:0"><?php
$class = $config['classes'] ?: 'thread-body bleed';
?><div class="<?php echo $class; ?>"><?php
if ($label = $this->field->getLocal('label')) { ?>
<h3><?php
echo Format::htmlchars($label);
......
......@@ -1387,8 +1387,8 @@ extends AbstractForm {
function getClean() {
$clean = parent::getClean();
list($clean['username'],) = preg_split('/[^\w.-]/', $clean['email'], 2);
if (Staff::lookup($clean['username']))
list($clean['username'],) = preg_split('/[^\w.-]/u', $clean['email'], 2);
if (mb_strlen($clean['username']) < 3 || Staff::lookup($clean['username']))
$clean['username'] = mb_strtolower($clean['firstname']);
$clean['perms'] = array(
User::PERM_CREATE,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment