Do not use a default regular expression for stripping off parts of a username when configuring an auto-login backend

There's no safe default for this.
This commit is contained in:
Eric Lippmann 2014-12-29 15:56:32 +01:00
parent e1bedc9afe
commit cfb52eeadb
1 changed files with 4 additions and 2 deletions

View File

@ -53,8 +53,10 @@ class AutologinBackendForm extends Form
'strip_username_regexp',
array(
'label' => t('Filter Pattern'),
'description' => t('The regular expression to use to strip specific parts off from usernames. Leave empty if you do not want to strip off anything'),
'value' => '/\@[^$]+$/',
'description' => t(
'The regular expression to use to strip specific parts off from usernames.'
. ' Leave empty if you do not want to strip off anything'
),
'validators' => array(
new Zend_Validate_Callback(function ($value) {
return @preg_match($value, '') !== false;