function action_new() { $login = $_POST['login']; $pwd = $_POST['pwd']; $email = $_POST['Email']; $inputTelefone = $_POST['inputTelefone']; $model = new RegisterModel(); $model->AccountName = $login; $model->Password = $pwd; $model->Email = $email; $model->Telefone = $inputTelefone; if (!AccountService::IsExistedByName($login)) { $account = AccountHelper::PopulateAccountFromRegisterViewModel($model); $account = AccountService::Create($account); EmailService::SendVerifyNewUserMessage($account, $model->Password, 'http://Store/', 'Account/VerifyNewAccount'); } else { echo 'Данной имя пользовател уже занято'; } }