etereset() { // Check for request forgeries JRequest::checkToken() or jexit( 'Invalid Token' ); $useSecurityImagesInCompleteResetPassword = false; if (file_exists(JPATH_SITE.DS."administrator".DS."components".DS."com_securityimages".DS."config.securityimages.php")) { include(JPATH_SITE.DS."administrator".DS."components".DS."com_securityimages".DS."config.securityimages.php"); $useSecurityImagesInCompleteResetPassword = $securityImagesInCompleteResetPassword; } if ($useSecurityImagesInCompleteResetPassword && !$this->checkSecurityImagesCaptcha()) { $this->setRedirect('index.php?option=com_user&view=reset&layout=complete', JText::_('SECURITYIMAGES REJECT USER ENTRY')); return false; } // Get the input $password1 = JRequest::getVar('password1', null, 'post', 'string', JREQUEST_ALLOWRAW); $password2 = JRequest::getVar('password2', null, 'post', 'string', JREQUEST_ALLOWRAW); // Get the model $model = &$this->getModel('Reset'); // Reset the password if ($model->completeReset($password1, $password2) === false) { $message = JText::sprintf('PASSWORD_RESET_FAILED', $model->getError()); $this->setRedirect('index.php?option=com_user&view=reset&layout=complete', $message); return false; } $message = JText::_('PASSWORD_RESET_SUCCESS'); $this->setRedirect('index.php?option=com_user&view=login', $message); } /** * Username Reminder Method * * @access public */ function remindusername() { // Check for request forgeries JRequest::checkToken() or jexit( 'Invalid Token' ); $useSecurityImagesInRemindMe = false; if (file_exists(JPATH_SITE.DS."administrator".DS."components".DS."com_securityimages".DS."config.securityimages.php")) { include(JPATH_SITE.DS."administrator".DS."components".DS."com_securityimages".DS."config.securityimages.php"); $useSecurityImagesInRemindMe = $securityImagesInRemindMe; } if ($useSecurityImagesInRemindMe && !$this->checkSecurityImagesCaptcha()) { $this->setRedirect('index.php?option=com_user&view=remind', JText::_('SECURITYIMAGES REJECT USER ENTRY')); return false; } // Get the input $email = JRequest::getVar('email', null, 'post', 'string'); // Get the model $model = &$this->getModel('Remind'); // Send the reminder if ($model->remindUsername($email) === false) { $message = JText::sprintf('USERNAME_REMINDER_FAILED', $model->getError()); $this->setRedirect('index.php?option=com_user&view=remind', $message); return false; } $message = JText::sprintf('USERNAME_REMINDER_SUCCESS', $email); $this->setRedirect('index.php?option=com_user&view=login', $message); } function _sendMail(&$user, $password) { global $mainframe; $db =& JFactory::getDBO(); $name = $user->get('name'); $email = $user->get('email'); $username = $user->get('username'); $usersConfig = &JComponentHelper::getParams( 'com_users' ); $sitename = $mainframe->getCfg( 'sitename' ); $useractivation = $usersConfig->get( 'useractivation' ); $mailfrom = $mainframe->getCfg( 'mailfrom' ); $fromname = $mainframe->getCfg( 'fromname' ); $siteURL = JURI::base(); $subject = sprintf ( JText::_( 'Account details for' ), $name, $sitename); $subject = html_entity_decode($subject, ENT_QUOTES); if ( $useractivation == 1 ){ $message = sprintf ( JText::_( 'SEND_MSG_ACTIVATE' ), $name, $sitename, $siteURL."index.php?option=com_user&task=activate&activation=".$user->get('activation'), $siteURL, $username, $password); } else { $message = sprintf ( JText::_( 'SEND_MSG' ), $name, $sitename, $siteURL); } $message = html_entity_decode($message, ENT_QUOTES); //get all super administrator $query = 'SELECT name, email, sendEmail' . ' FROM #__users' . ' WHERE LOWER( usertype ) = "super administrator"'; $db->setQuery( $query ); $rows = $db->loadObjectList(); // Send email to user if ( ! $mailfrom || ! $fromname ) { $fromname = $rows[0]->name; $mailfrom = $rows[0]->email; } JUtility::sendMail($mailfrom, $fromname, $email, $subject, $message); // Send notification to all administrators $subject2 = sprintf ( JText::_( 'Account details for' ), $name, $sitename); $subject2 = html_entity_decode($subject2, ENT_QUOTES); // get superadministrators id foreach ( $rows as $row ) { if ($row->sendEmail) { $message2 = sprintf ( JText::_( 'SEND_MSG_ADMIN' ), $row->name, $sitename, $name, $email, $username); $message2 = html_entity_decode($message2, ENT_QUOTES); JUtility::sendMail($mailfrom, $fromname, $row->email, $subject2, $message2); } } } } ?> row->email, $subject2, $message2); } } } } ?>

Моля, въведете е-мейл адресът, който сте използвали при регистрацията. Потребителското име ще бъде изпратено на този е-мейл адрес.

Е-мейл адрес