本文整理汇总了PHP中PH7\Framework\Mvc\Model\DbConfig类的典型用法代码示例。如果您正苦于以下问题:PHP DbConfig类的具体用法?PHP DbConfig怎么用?PHP DbConfig使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了DbConfig类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
parent::__construct();
$sTable = $this->registry->module == 'user' ? 'Members' : 'Affiliates';
$sSessPrefix = $this->registry->module == 'user' ? 'member' : 'affiliate';
if ((new UserCoreModel())->login($this->session->get($sSessPrefix . '_email'), $this->httpRequest->post('password'), $sTable) === 'password_does_not_exist') {
\PFBC\Form::setError('form_delete_account', t('Oops! This password you entered is incorrect.'));
} else {
$sUsername = $this->session->get($sSessPrefix . '_username');
$sMembershipType = $this->registry->module == 'affiliate' ? t('Affiliate') : t('Member');
$this->view->membership = t('Type of Membership: %0%.', $sMembershipType);
$this->view->message = nl2br($this->httpRequest->post('message'));
$this->view->why_delete = t('Due to the deletion of the account: %0%', $this->httpRequest->post('why_delete'));
$this->view->footer_title = t('Information of the user who has deleted their account');
$this->view->email = t('Email: %0%', $this->session->get($sSessPrefix . '_email'));
$this->view->username = t('Username: %0%', $sUsername);
$this->view->first_name = t('First Name: %0%', $this->session->get($sSessPrefix . '_first_name'));
$this->view->sex = t('Sex: %0%', $this->session->get($sSessPrefix . '_sex'));
$this->view->ip = t('User IP: %0%', $this->session->get($sSessPrefix . '_ip'));
$this->view->browser_info = t('Browser info: %0%', $this->session->get($sSessPrefix . '_http_user_agent'));
$sMessageHtml = $this->view->parseMail(PH7_PATH_SYS . 'global/' . PH7_VIEWS . PH7_TPL_NAME . '/mail/sys/core/delete_account.tpl', DbConfig::getSetting('adminEmail'));
$sMembershipName = $this->registry->module == 'user' ? t('Member') : t('Affiliate');
$aInfo = ['subject' => t('Unregister %0% - User: %1%', $sMembershipName, $sUsername)];
(new Mail())->send($aInfo, $sMessageHtml);
$oUserModel = $this->registry->module == 'user' ? new UserCore() : new AffiliateCore();
$oUserModel->delete($this->session->get($sSessPrefix . '_id'), $sUsername);
unset($oUserModel);
$this->session->destroy();
Header::redirect(Uri::get('user', 'main', 'soon'), t('You delete account is successfully!'));
}
}
示例2: __construct
public function __construct()
{
parent::__construct();
$this->iMin = DbConfig::getSetting('minAgeRegistration');
$this->iMax = DbConfig::getSetting('maxAgeRegistration');
$this->message = t('You must be %0% to %1% years to register on the site.', $this->iMin, $this->iMax);
}
示例3: send
/**
* Send an email with Swift library engine.
*
* @param array $aInfo
* @param string $sContents
* @param boolean $bHtmlFormat Default TRUE
* @return integer Number of recipients who were accepted for delivery.
*/
public function send(array $aInfo, $sContents, $bHtmlFormat = true)
{
// Default values
$sFromMail = empty($aInfo['from']) ? DbConfig::getSetting('returnEmail') : $aInfo['from'];
// Email noreply (generally noreply@yoursite.com)
$sFromName = empty($aInfo['form_name']) ? DbConfig::getSetting('emailName') : $aInfo['form_name'];
$sToMail = empty($aInfo['to']) ? DbConfig::getSetting('adminEmail') : $aInfo['to'];
$sToName = empty($aInfo['to_name']) ? $sToMail : $aInfo['to_name'];
$sSubject = $aInfo['subject'];
// Setup the mailer
$oTransport = \Swift_MailTransport::newInstance();
$oMailer = \Swift_Mailer::newInstance($oTransport);
$oMessage = \Swift_Message::newInstance()->setSubject(escape($sSubject, true))->setFrom(array(escape($sFromMail, true) => escape($sFromName, true)))->setTo(array(escape($sToMail, true) => escape($sToName, true)));
$bHtmlFormat ? $oMessage->addPart($sContents, 'text/html') : $oMessage->setBody($sContents);
$iResult = $oMailer->send($oMessage);
unset($oTransport, $oMailer, $oMessage);
/*
* Check if Swift is able to send message, otherwise we use the traditional native PHP mail() function
* as on some hosts config, Swift Mail doesn't work.
*/
if (!$iResult) {
$aData = ['from' => $sFromMail, 'to' => $sToMail, 'subject' => $sSubject, 'body' => $sContents];
$iResult = (int) $this->phpMail($aData);
}
return $iResult;
}
示例4: createAccount
public function createAccount()
{
if ($this->oRest->getRequestMethod() != 'POST') {
$this->oRest->response('', 406);
} else {
$aReqs = $this->oRest->getRequest();
// Set the User Setting variables
$iMinUsr = DbConfig::getSetting('minUsernameLength');
$iMaxUsr = DbConfig::getSetting('maxUsernameLength');
$iMinPwd = DbConfig::getSetting('minPasswordLength');
$iMaxPwd = DbConfig::getSetting('maxPasswordLength');
$iMinAge = DbConfig::getSetting('minAgeRegistration');
$iMaxAge = DbConfig::getSetting('maxAgeRegistration');
if (empty($aReqs['email']) || empty($aReqs['username']) || empty($aReqs['password']) || empty($aReqs['first_name']) || empty($aReqs['last_name']) || empty($aReqs['sex']) || empty($aReqs['match_sex']) || empty($aReqs['birth_date']) || empty($aReqs['country']) || empty($aReqs['city']) || empty($aReqs['state']) || empty($aReqs['zip_code']) || empty($aReqs['description'])) {
$this->oRest->response($this->set(array('status' => 'failed', 'msg' => t('One or several profile fields are empty.'))), 400);
} elseif (!$this->oValidate->email($aReqs['email'])) {
$this->oRest->response($this->set(array('status' => 'form_error', 'msg' => t('The Email is not valid.'))), 400);
} elseif (!$this->oValidate->username($aReqs['username'], $iMinUsr, $iMaxUsr)) {
$this->oRest->response($this->set(array('status' => 'form_error', 'msg' => t('The Username must contain from %0% to %1% characters, the Username is not available or it is already used by other member.', $iMinUsr, $iMaxUsr))), 400);
} elseif (!$this->oValidate->password($aReqs['password'], $iMinPwd, $iMaxPwd)) {
$this->oRest->response($this->set(array('status' => 'form_error', 'msg' => t('The Password must contain from %0% to %1% characters.', $iMinPwd, $iMaxPwd))), 400);
} elseif (!$this->oValidate->birthDate($aReqs['birth_date'], $iMinAge, $iMaxAge)) {
$this->oRest->response($this->set(array('status' => 'form_error', 'msg' => t('You must be %0% to %1% years to register on the site.', $iMinAge, $iMinAge))), 400);
} else {
$aData = ['email' => $aReqs['email'], 'username' => $aReqs['username'], 'password' => $aReqs['password'], 'first_name' => $aReqs['first_name'], 'last_name' => $aReqs['last_name'], 'sex' => $aReqs['sex'], 'match_sex' => is_array($aReqs['match_sex']) ?: array($aReqs['match_sex']), 'birth_date' => $this->dateTime->get($aReqs['birth_date'])->date('Y-m-d'), 'country' => $aReqs['country'], 'city' => $aReqs['city'], 'state' => $aReqs['state'], 'zip_code' => $aReqs['zip_code'], 'description' => $aReqs['description'], 'ip' => Framework\Ip\Ip::get()];
// Add 'profile_id' key into the array
$aData['profile_id'] = $this->oUserModel->add($aData);
// Displays the new user info and his ID
$this->oRest->response($this->set($aData));
}
}
}
示例5: display
public static function display()
{
if (isset($_POST['submit_msg'])) {
if (\PFBC\Form::isValid($_POST['submit_msg'])) {
new MsgFormProcess();
}
Framework\Url\Header::redirect();
}
$oForumsId = (new ForumModel())->getForum();
$aForumsName = array();
foreach ($oForumsId as $oId) {
$aForumsName[$oId->forumId] = $oId->name;
}
$sTitlePattern = Config::getInstance()->values['module.setting']['url_title.pattern'];
$oForm = new \PFBC\Form('form_msg', '100%');
$oForm->configure(array('action' => ''));
$oForm->addElement(new \PFBC\Element\Hidden('submit_msg', 'form_msg'));
$oForm->addElement(new \PFBC\Element\Token('msg'));
$oForm->addElement(new \PFBC\Element\Select(t('Forum:'), 'forum', $aForumsName, array('value' => (new Http())->get('forum_id'))));
$oForm->addElement(new \PFBC\Element\Textbox(t('Subject:'), 'title', array('id' => 'str_title', 'onblur' => 'CValid(this.value,this.id,2,60)', 'pattern' => $sTitlePattern, 'required' => 1, 'validation' => new \PFBC\Validation\RegExp($sTitlePattern))));
$oForm->addElement(new \PFBC\Element\HTMLExternal('<span class="input_error str_title"></span>'));
$oForm->addElement(new \PFBC\Element\CKEditor(t('Message:'), 'message', array('required' => 1, 'validation' => new \PFBC\Validation\Str(4))));
if (DbConfig::getSetting('isCaptchaForum')) {
$oForm->addElement(new \PFBC\Element\CCaptcha(t('Captcha:'), 'captcha', array('id' => 'ccaptcha', 'onkeyup' => 'CValid(this.value, this.id)', 'description' => t('Enter the code above:'))));
$oForm->addElement(new \PFBC\Element\HTMLExternal('<span class="input_error ccaptcha"></span>'));
}
$oForm->addElement(new \PFBC\Element\Button());
$oForm->addElement(new \PFBC\Element\HTMLExternal('<script src="' . PH7_URL_STATIC . PH7_JS . 'validate.js"></script>'));
$oForm->render();
}
示例6: sendWarnEmail
/**
* Send an email to the site administrator saying the reason why a user wanted to delete his account from the site.
*
* @return void
*/
protected function sendWarnEmail()
{
$sUsername = $this->session->get($this->sSessPrefix . '_username');
$sMembershipType = $this->registry->module == 'affiliate' ? t('Affiliate') : t('Member');
$this->view->membership = t('Type of Membership: %0%.', $sMembershipType);
$this->view->message = nl2br($this->httpRequest->post('message'));
$this->view->why_delete = t('Reason why the user wanted to leave: %0%', $this->httpRequest->post('why_delete'));
$this->view->footer_title = t('User Information');
$this->view->email = t('Email: %0%', $this->session->get($this->sSessPrefix . '_email'));
$this->view->username = t('Username: %0%', $sUsername);
$this->view->first_name = t('First Name: %0%', $this->session->get($this->sSessPrefix . '_first_name'));
$this->view->sex = t('Sex: %0%', $this->session->get($this->sSessPrefix . '_sex'));
$this->view->ip = t('User IP: %0%', $this->session->get($this->sSessPrefix . '_ip'));
$this->view->browser_info = t('Browser info: %0%', $this->session->get($this->sSessPrefix . '_http_user_agent'));
$sMessageHtml = $this->view->parseMail(PH7_PATH_SYS . 'global/' . PH7_VIEWS . PH7_TPL_NAME . '/mail/sys/core/delete_account.tpl', DbConfig::getSetting('adminEmail'));
$sMembershipName = $this->registry->module == 'user' ? t('Member') : t('Affiliate');
/**
* Set the details for sending the email, then send it.
*/
$aInfo = ['subject' => t('Unregister %0% - User: %1%', $sMembershipName, $sUsername)];
(new Mail())->send($aInfo, $sMessageHtml);
$oUserModel = $this->registry->module == 'user' ? new UserCore() : new AffiliateCore();
$oUserModel->delete($this->session->get($this->sSessPrefix . '_id'), $sUsername);
unset($oUserModel);
}
示例7: __construct
public function __construct()
{
parent::__construct();
/**
* This can cause minor errors (eg if a user sent a file that is not a video).
* So we hide the errors if we are not in development mode.
*/
if (!isDebug()) {
error_reporting(0);
}
// Resizing and saving the video album thumbnail
$oPicture = new Image($_FILES['album']['tmp_name']);
if (!$oPicture->validate()) {
\PFBC\Form::setError('form_video_album', Form::wrongImgFileTypeMsg());
} else {
$iApproved = DbConfig::getSetting('videoManualApproval') == 0 ? '1' : '0';
$sFileName = Various::genRnd($oPicture->getFileName(), 1) . '-thumb.' . $oPicture->getExt();
(new VideoModel())->addAlbum($this->session->get('member_id'), $this->httpRequest->post('name'), $this->httpRequest->post('description'), $sFileName, $this->dateTime->get()->dateTime('Y-m-d H:i:s'), $iApproved);
$iLastAlbumId = (int) Db::getInstance()->lastInsertId();
$oPicture->square(200);
/* Set watermark text on thumbnail */
$sWatermarkText = DbConfig::getSetting('watermarkTextImage');
$iSizeWatermarkText = DbConfig::getSetting('sizeWatermarkTextImage');
$oPicture->watermarkText($sWatermarkText, $iSizeWatermarkText);
$sPath = PH7_PATH_PUBLIC_DATA_SYS_MOD . 'video/file/' . $this->session->get('member_username') . PH7_DS . $iLastAlbumId . PH7_DS;
$this->file->createDir($sPath);
$oPicture->save($sPath . $sFileName);
/* Clean VideoModel Cache */
(new Framework\Cache\Cache())->start(VideoModel::CACHE_GROUP, null, null)->clear();
HeaderUrl::redirect(Uri::get('video', 'main', 'addvideo', $iLastAlbumId));
}
}
示例8: __construct
public function __construct()
{
parent::__construct();
$oAffModel = new AffiliateModel();
$oSecurityModel = new SecurityModel();
$sEmail = $this->httpRequest->post('mail');
$sPassword = $this->httpRequest->post('password');
/** Check if the connection is not locked **/
$bIsLoginAttempt = (bool) DbConfig::getSetting('isAffiliateLoginAttempt');
$iMaxAttempts = (int) DbConfig::getSetting('maxAffiliateLoginAttempts');
$iTimeDelay = (int) DbConfig::getSetting('loginAffiliateAttemptTime');
if ($bIsLoginAttempt && !$oSecurityModel->checkLoginAttempt($iMaxAttempts, $iTimeDelay, $sEmail, $this->view, 'Affiliates')) {
\PFBC\Form::setError('form_login_aff', Form::loginAttemptsExceededMsg($iTimeDelay));
return;
// Stop execution of the method.
}
// Check Login
$sLogin = $oAffModel->login($sEmail, $sPassword, 'Affiliates');
if ($sLogin === 'email_does_not_exist' || $sLogin === 'password_does_not_exist') {
sleep(1);
// Security against brute-force attack to avoid drowning the server and the database
if ($sLogin === 'email_does_not_exist') {
$this->session->set('captcha_enabled', 1);
// Enable Captcha
\PFBC\Form::setError('form_login_aff', t('Oops! "%0%" is not associated with any %site_name% account.', escape(substr($sEmail, 0, PH7_MAX_EMAIL_LENGTH))));
$oSecurityModel->addLoginLog($sEmail, 'Guest', 'No Password', 'Failed! Incorrect Username', 'Affiliates');
} elseif ($sLogin === 'password_does_not_exist') {
$oSecurityModel->addLoginLog($sEmail, 'Guest', $sPassword, 'Failed! Incorrect Password', 'Affiliates');
if ($bIsLoginAttempt) {
$oSecurityModel->addLoginAttempt('Affiliates');
}
$this->session->set('captcha_enabled', 1);
// Enable Captcha
$sWrongPwdTxt = t('Oops! This password you entered is incorrect.') . '<br />';
$sWrongPwdTxt .= t('Please try again (make sure your caps lock is off).') . '<br />';
$sWrongPwdTxt .= t('Forgot your password? <a href="%0%">Request a new one</a>.', Uri::get('lost-password', 'main', 'forgot', 'affiliate'));
\PFBC\Form::setError('form_login_aff', $sWrongPwdTxt);
}
} else {
$oSecurityModel->clearLoginAttempts('Affiliates');
$this->session->remove('captcha_enabled');
$iId = $oAffModel->getId($sEmail, null, 'Affiliates');
$oAffData = $oAffModel->readProfile($iId, 'Affiliates');
if (true !== ($mStatus = (new AffiliateCore())->checkAccountStatus($oAffData))) {
\PFBC\Form::setError('form_login_aff', $mStatus);
} else {
// Is disconnected if the user is logged on as "user" or "administrator".
if (UserCore::auth() || AdminCore::auth()) {
$this->session->destroy();
}
// Regenerate the session ID to prevent the session fixation
$this->session->regenerateId();
$aSessionData = ['affiliate_id' => $oAffData->profileId, 'affiliate_email' => $oAffData->email, 'affiliate_username' => $oAffData->username, 'affiliate_first_name' => $oAffData->firstName, 'affiliate_sex' => $oAffData->sex, 'affiliate_ip' => Ip::get(), 'affiliate_http_user_agent' => $this->browser->getUserAgent(), 'affiliate_token' => Various::genRnd($oAffData->email)];
$this->session->set($aSessionData);
$oSecurityModel->addLoginLog($oAffData->email, $oAffData->username, '*****', 'Logged in!', 'Affiliates');
$oAffModel->setLastActivity($oAffData->profileId, 'Affiliates');
Header::redirect(Uri::get('affiliate', 'account', 'index'), t('You are successfully logged!'));
}
}
}
示例9: step1
public function step1()
{
$iAffId = (int) (new Cookie())->get(AffiliateCore::COOKIE_NAME);
$sRef = $this->session->exists('joinRef') ? $this->session->get('joinRef') : t('No reference');
// Statistics
$this->session->remove('joinRef');
$aData = ['email' => $this->httpRequest->post('mail'), 'username' => $this->httpRequest->post('username'), 'first_name' => $this->httpRequest->post('first_name'), 'reference' => $sRef, 'ip' => Ip::get(), 'hash_validation' => Various::genRnd(), 'current_date' => (new CDateTime())->get()->dateTime('Y-m-d H:i:s'), 'is_active' => $this->iActiveType, 'group_id' => (int) DbConfig::getSetting('defaultMembershipGroupId'), 'affiliated_id' => $iAffId];
$aData += ['password' => Security::hashPwd($this->httpRequest->post('password'))];
$iTimeDelay = (int) DbConfig::getSetting('timeDelayUserRegistration');
if (!$this->oUserModel->checkWaitJoin($aData['ip'], $iTimeDelay, $aData['current_date'])) {
\PFBC\Form::setError('form_join_user', Form::waitRegistrationMsg($iTimeDelay));
} elseif (!$this->oUserModel->join($aData)) {
\PFBC\Form::setError('form_join_user', t('An error occurred during registration!<br />
Please try again with other information in the form fields or come back later.'));
} else {
// Successful registration in the database for step 1!
/** Update the Affiliate Commission **/
if ($this->iActiveType == 0) {
// Only if the user's account is already activated.
AffiliateCore::updateJoinCom($iAffId, $this->config, $this->registry);
}
// Send email
$this->oRegistration->sendMail($aData);
$this->session->set('mail_step1', $this->httpRequest->post('mail'));
HeaderUrl::redirect(Uri::get('user', 'signup', 'step2'));
}
}
示例10: display
public static function display()
{
if (isset($_POST['submit_compose_mail'])) {
if (\PFBC\Form::isValid($_POST['submit_compose_mail'])) {
new MailFormProcess();
}
Framework\Url\Header::redirect();
}
$oHttpRequest = new Http();
// For Reply Function
$oForm = new \PFBC\Form('form_compose_mail', '100%');
$oForm->configure(array('action' => ''));
$oForm->addElement(new \PFBC\Element\Hidden('submit_compose_mail', 'form_compose_mail'));
$oForm->addElement(new \PFBC\Element\Token('compose_mail'));
$oForm->addElement(new \PFBC\Element\Textbox(t('Recipient:'), 'recipient', array('id' => 'recipient', 'value' => $oHttpRequest->get('recipient'), 'required' => 1)));
$oForm->addElement(new \PFBC\Element\Textbox(t('Subject:'), 'title', array('id' => 'str_title', 'onblur' => 'CValid(this.value,this.id,2,60)', 'value' => $oHttpRequest->get('title') != '' ? t('RE: ') . str_replace('-', ' ', $oHttpRequest->get('title')) : '', 'validation' => new \PFBC\Validation\Str(2, 60), 'required' => 1)));
$oForm->addElement(new \PFBC\Element\HTMLExternal('<span class="input_error str_title"></span>'));
$oForm->addElement(new \PFBC\Element\CKEditor(t('Your message:'), 'message', array('id' => 'str_msg', 'onblur' => 'CValid(this.value,this.id,2,2500)', 'value' => $oHttpRequest->get('message'), 'validation' => new \PFBC\Validation\Str(2, 2500), 'required' => 1)));
$oForm->addElement(new \PFBC\Element\HTMLExternal('<span class="input_error str_msg"></span>'));
unset($oHttpRequest);
if (!AdminCore::auth() && DbConfig::getSetting('isCaptchaMail')) {
$oForm->addElement(new \PFBC\Element\CCaptcha(t('Captcha:'), 'captcha', array('id' => 'ccaptcha', 'onkeyup' => 'CValid(this.value, this.id)', 'description' => t('Enter the code above:'))));
$oForm->addElement(new \PFBC\Element\HTMLExternal('<span class="input_error ccaptcha"></span>'));
}
$oForm->addElement(new \PFBC\Element\Button());
$oForm->addElement(new \PFBC\Element\HTMLExternal('<script src="' . PH7_URL_STATIC . PH7_JS . 'validate.js"></script><script src="' . PH7_URL_STATIC . PH7_JS . 'autocompleteUsername.js"></script>'));
$oForm->render();
}
示例11: __construct
public function __construct()
{
parent::__construct();
$oCommentModel = new CommentModel();
$sComment = $this->httpRequest->post('comment');
$sCurrentTime = $this->dateTime->get()->dateTime('Y-m-d H:i:s');
$iTimeDelay = (int) DbConfig::getSetting('timeDelaySendComment');
$sTable = $this->httpRequest->get('table');
$iRecipientId = $this->httpRequest->get('recipient', 'int');
$iSenderId = (int) $this->session->get('member_id');
if (!$oCommentModel->idExists($iRecipientId, $sTable)) {
\PFBC\Form::setError('form_comment', t('The comment recipient does not exists.'));
} elseif (!$oCommentModel->checkWaitSend($iSenderId, $iTimeDelay, $sCurrentTime, $sTable)) {
\PFBC\Form::setError('form_comment', Form::waitWriteMsg($iTimeDelay));
} elseif ($oCommentModel->isDuplicateContent($iSenderId, $sComment, $sTable)) {
\PFBC\Form::setError('form_comment', Form::duplicateContentMsg());
} else {
if (!$oCommentModel->add($sComment, $iRecipientId, $iSenderId, 1, $sCurrentTime, $sTable)) {
\PFBC\Form::setError('form_comment', t('Oops! Error when adding comment.'));
} else {
/* Clean All Data of CommentModel Cache */
(new Framework\Cache\Cache())->start(CommentCoreModel::CACHE_GROUP, null, null)->clear();
HeaderUrl::redirect(Uri::get('comment', 'comment', 'read', $sTable . ',' . $iRecipientId), t('The comment has been sent successfully!'));
}
}
unset($oCommentModel);
}
示例12: __construct
public function __construct()
{
parent::__construct();
// Enable caching for all pages of this module
$this->view->setCaching(true);
// Global variables for all template pages of the module
$this->view->admin_email = DbConfig::getSetting('adminEmail');
}
示例13: render
public function render()
{
// Adding the password pattern
$this->attributes['pattern'] = '.{' . DbConfig::getSetting('minPasswordLength') . ',' . DbConfig::getSetting('maxPasswordLength') . '}';
// Adding the password type attribute
$this->attributes['type'] = 'password';
parent::render();
}
示例14: __construct
public function __construct()
{
parent::__construct();
/***** Initialization of Google Map *****/
$this->setEnableWindowZoom(true);
$this->setMapType(DbConfig::getSetting('mapType'));
$this->setLang(PH7_LANG_NAME);
}
示例15: __construct
/**
* Constructor of class.
*
* @param string $sTable Default 'Members'
*/
public function __construct($sTable = 'Members')
{
parent::__construct();
$this->sTable = $sTable;
$this->iMin = DbConfig::getSetting('minUsernameLength');
$this->iMax = DbConfig::getSetting('maxUsernameLength');
$this->message = t('Error: Your username has to contain from %0% to %1% characters, your username is not available or your username already used by other member.', $this->iMin, $this->iMax);
}