Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Installation/FormGeneralSetup.php')
-rw-r--r--plugins/Installation/FormGeneralSetup.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/plugins/Installation/FormGeneralSetup.php b/plugins/Installation/FormGeneralSetup.php
index 0f9e8d0662..a1b62aaaf9 100644
--- a/plugins/Installation/FormGeneralSetup.php
+++ b/plugins/Installation/FormGeneralSetup.php
@@ -16,6 +16,25 @@
*/
class Piwik_Installation_FormGeneralSetup extends Piwik_Form
{
+ function __construct()
+ {
+ parent::__construct($action = '', $attributes = 'autocomplete="off"');
+ }
+
+ function validate()
+ {
+ try {
+ $login = $this->getSubmitValue('login');
+ if(!empty($login))
+ {
+ Piwik::checkValidLoginString($login);
+ }
+ } catch(Exception $e) {
+ $this->_errors['login'] = $e->getMessage();
+ }
+ return parent::validate();
+ }
+
function init()
{
$urlToGoAfter = 'index.php' . Piwik_Url::getCurrentQueryString();