mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-05-19 17:28:23 +03:00
fix #695
This commit is contained in:
parent
f78408941d
commit
228958f1e3
|
@ -572,13 +572,8 @@ class ActionSettings extends Action
|
|||
/**
|
||||
* Проверяем дату рождения
|
||||
*/
|
||||
if (func_check(getRequestStr('profile_birthday_day'), 'id', 1,
|
||||
2) and func_check(getRequestStr('profile_birthday_month'), 'id', 1,
|
||||
2) and func_check(getRequestStr('profile_birthday_year'), 'id', 4, 4)
|
||||
) {
|
||||
$this->oUserCurrent->setProfileBirthday(date("Y-m-d H:i:s",
|
||||
mktime(0, 0, 0, getRequestStr('profile_birthday_month'), getRequestStr('profile_birthday_day'),
|
||||
getRequestStr('profile_birthday_year'))));
|
||||
if (preg_match('#^(\d{1,2})\.(\d{1,2})\.(\d{4})$#', getRequestStr('profile_birthday'), $aMatch)) {
|
||||
$this->oUserCurrent->setProfileBirthday(date("Y-m-d H:i:s", mktime(0, 0, 0, $aMatch[2], $aMatch[1], $aMatch[3])));
|
||||
} else {
|
||||
$this->oUserCurrent->setProfileBirthday(null);
|
||||
}
|
||||
|
|
|
@ -62,6 +62,7 @@
|
|||
{component 'field' template='date'
|
||||
name = 'profile_birthday'
|
||||
inputClasses = 'js-field-date-default'
|
||||
value = {date_format date=$user->getProfileBirthday() format='j.n.Y'}
|
||||
label = {lang name='user.settings.profile.fields.birthday.label'}}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue