mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-05-13 06:18:18 +03:00
добавлена возможность менять e-mail в профиле
This commit is contained in:
parent
a2bf3567db
commit
dd38208f80
|
@ -77,7 +77,7 @@ class ActionRegistration extends Action {
|
|||
* Проверка мыла
|
||||
*/
|
||||
if (!func_check(getRequest('mail'),'mail')) {
|
||||
$this->Message_AddError('Неверный мыло','Ошибка');
|
||||
$this->Message_AddError('Неверный формат e-mail','Ошибка');
|
||||
$bError=true;
|
||||
}
|
||||
/**
|
||||
|
|
|
@ -79,6 +79,20 @@ class ActionSettings extends Action {
|
|||
} else {
|
||||
$this->oUserCurrent->setProfileName(null);
|
||||
}
|
||||
/**
|
||||
* Проверка мыла
|
||||
*/
|
||||
if (func_check(getRequest('mail'),'mail')) {
|
||||
if ($oUserMail=$this->User_GetUserByMail(getRequest('mail')) and $oUserMail->getId()!=$this->oUserCurrent->getId()) {
|
||||
$this->Message_AddError('Этот емайл уже занять','Ошибка');
|
||||
$bError=true;
|
||||
} else {
|
||||
$this->oUserCurrent->setMail(getRequest('mail'));
|
||||
}
|
||||
} else {
|
||||
$this->Message_AddError('Неверный формат e-mail','Ошибка');
|
||||
$bError=true;
|
||||
}
|
||||
/**
|
||||
* Проверяем пол
|
||||
*/
|
||||
|
|
|
@ -19,6 +19,10 @@
|
|||
<span class="form_note">Может состоять только из букв (A-Z a-z), цифр (0-9). Длина имени не может быть меньше 2 и больше 20 символов.</span><br />
|
||||
<br>
|
||||
|
||||
<label for="mail"><span class="form">E-mail:</span></label><br />
|
||||
<input style="width: 60%;" type="text" name="mail" tabindex="1" id="mail" value="{$oUserCurrent->getMail()|escape:'html'}" size="20" /> <br>
|
||||
<span class="form_note">Ваш реальный почтовый адрес, на него будут приходить уведомления</span><br />
|
||||
<br>
|
||||
|
||||
<span class="form">Пол:</span><br />
|
||||
<input type="radio" name="profile_sex" id="profile_sex_m" value="man" {if $oUserCurrent->getProfileSex()=='man'}checked{/if}> — <span class="form"><label for="profile_sex_m">мужской</label></span> <br />
|
||||
|
|
|
@ -62,7 +62,7 @@ var msgNoticeBox=new Roar({
|
|||
<nobr>У вас нет <A class=hello_exit href="{$DIR_WEB_ROOT}/talk/">новых сообщений</a></nobr><br>
|
||||
{/if}
|
||||
|
||||
Настройки <A class=hello_exit href="{$DIR_WEB_ROOT}/settings/">профиля</a>
|
||||
Изменить <A class=hello_exit href="{$DIR_WEB_ROOT}/settings/">настройки профиля</a>
|
||||
{else}
|
||||
<DIV class=hello>
|
||||
<form action="{$DIR_WEB_ROOT}/login/" method="POST" id="loginform">
|
||||
|
|
Loading…
Reference in a new issue