/** * Display form to change user's password. * @param $args array first argument may contain user's username */ function changePassword($args = array()) { $this->validate(); $this->setupTemplate(); import('classes.user.form.LoginChangePasswordForm'); $passwordForm = new LoginChangePasswordForm(); $passwordForm->initData(); if (isset($args[0])) { $passwordForm->setData('username', $args[0]); } $passwordForm->display(); }
/** * Display form to change user's password. * @param $args array first argument may contain user's username */ function changePassword($args, $request) { $this->setupTemplate($request); import('lib.pkp.classes.user.form.LoginChangePasswordForm'); $passwordForm = new LoginChangePasswordForm($request->getSite()); $passwordForm->initData(); if (isset($args[0])) { $passwordForm->setData('username', $args[0]); } $passwordForm->display($request); }