diff --git a/composer.json b/composer.json index 5f6ed80..42fddd2 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "type": "phpbb-extension", "description": "A phpBB 3.2 extension that allows users to switch between their accounts with ease.", "homepage": "https://github.com/flerex/linkedaccounts", - "version": "1.0.3", + "version": "1.0.4", "time": "2018-03-01", "keywords": ["flerex", "topic", "participants", "list"], "license": "GPL-2.0", diff --git a/ucp/main_module.php b/ucp/main_module.php index eb915b0..8412ede 100644 --- a/ucp/main_module.php +++ b/ucp/main_module.php @@ -63,19 +63,19 @@ public function main($id, $mode) switch($mode) { case 'management': + default: $this->tpl_name = 'ucp_management'; $this->page_title = $this->user->lang('LINKED_ACCOUNTS_MANAGEMENT'); + $this->mode_management(); break; case 'link': $this->tpl_name = 'ucp_link'; $this->page_title = $this->user->lang('LINKING_ACCOUNT'); + $this->mode_link(); break; - } - - $this->{'mode_' . $mode}(); - + } @@ -106,6 +106,7 @@ private function mode_link() $passwords_manager = $this->phpbb_container->get('passwords.manager'); + $errors = array(); if(!(empty($password) && empty($cur_password) && empty($username))) { if(empty($cur_password))