mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 08:39:07 +01:00
check for a valid birthday date if we run the contacts cleanup tool
This commit is contained in:
parent
81aa0dcc26
commit
144f5fe24c
@ -504,6 +504,12 @@ class addressbook_bo extends addressbook_so
|
||||
{
|
||||
$fields_to_update[$field_name] = $field_value = null;
|
||||
}
|
||||
// check for valid birthday date
|
||||
if ($field_name == 'bday' && $field_value != null &&
|
||||
!preg_match('/^(18|19|20)\d{2}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/',$field_value))
|
||||
{
|
||||
$fields_to_update[$field_name] = $field_value = null;
|
||||
}
|
||||
}
|
||||
|
||||
if(count($fields_to_update) > 0)
|
||||
|
Loading…
Reference in New Issue
Block a user