diff options
author | simonp <simon.plasger@web.de> | 2014-06-06 20:24:24 +0200 |
---|---|---|
committer | simonp <simon.plasger@web.de> | 2014-06-06 20:24:24 +0200 |
commit | 9e9c03cb9078b9d9a89979e8cace8d9370cf972c (patch) | |
tree | f741683b49bdcad5740695368ad9cc63de493e93 /plugins | |
parent | e7ee70541fe60800480d7b3a830a80f715e60ce2 (diff) |
Moved functionality from password_first to password_init
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/password/password.php | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/plugins/password/password.php b/plugins/password/password.php index a9e6f4e04..2448b4563 100644 --- a/plugins/password/password.php +++ b/plugins/password/password.php @@ -71,8 +71,7 @@ class password extends rcube_plugin } $this->add_hook('settings_actions', array($this, 'settings_actions')); - if($rcmail->config->get('password_force_new_user')) - { + if($rcmail->config->get('password_force_new_user')) { $this->add_hook('user_create', array($this, 'user_create')); $this->add_hook('login_after', array($this, 'login_after')); } @@ -101,6 +100,10 @@ class password extends rcube_plugin $rcmail = rcmail::get_instance(); $rcmail->output->set_pagetitle($this->gettext('changepasswd')); + $first = rcube_utils::get_input_value('_first', rcube_utils::INPUT_GET); + if(isset($first) && $first == 'true') { + $rcmail->output->command('display_message', $this->gettext('firstloginchange'), 'notice'); + } $rcmail->output->send('plugin'); } @@ -319,19 +322,9 @@ class password extends rcube_plugin if($this->newuser) { $args['_task'] = 'settings'; - $args['_action'] = 'plugin.password-first'; + $args['_action'] = 'plugin.password'; + $args['_first'] = 'true'; } return $args; } - - function password_first() - { - $rcmail = rcmail::get_instance(); - $this->add_texts('localization/'); - $this->register_handler('plugin.body', array($this, 'password_form')); - $rcmail->output->set_pagetitle($this->gettext('changepasswd')); - $rcmail->output->command('display_message', $this->gettext('firstloginchange'), 'notice'); - $rcmail->overwrite_action('plugin.password'); - $rcmail->output->send('plugin'); - } } |