From be9008d3e4137a2456222098dfe45589e23ee3cf Mon Sep 17 00:00:00 2001
From: Christopher Smith <chris@jalakai.co.uk>
Date: Sun, 16 Feb 2014 17:54:48 +0000
Subject: [PATCH] user global  strings for password confirmation prompt & error

---
 lib/plugins/usermanager/admin.php        | 6 ++++--
 lib/plugins/usermanager/lang/en/lang.php | 4 ----
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php
index faa4b8d31..aac2da605 100644
--- a/lib/plugins/usermanager/admin.php
+++ b/lib/plugins/usermanager/admin.php
@@ -277,6 +277,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
     protected function _htmlUserForm($cmd,$user='',$userdata=array(),$indent=0) {
         global $conf;
         global $ID;
+        global $lang;
 
         $name = $mail = $groups = '';
         $notes = array();
@@ -299,7 +300,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
 
         $this->_htmlInputField($cmd."_userid",    "userid",    $this->lang["user_id"],    $user,  $this->_auth->canDo("modLogin"), $indent+6);
         $this->_htmlInputField($cmd."_userpass",  "userpass",  $this->lang["user_pass"],  "",     $this->_auth->canDo("modPass"),  $indent+6);
-        $this->_htmlInputField($cmd."_userpass2", "userpass2", $this->lang["user_passconfirm"], "", $this->_auth->canDo("modPass"), $indent+6);
+        $this->_htmlInputField($cmd."_userpass2", "userpass2", $lang["passchk"],          "",     $this->_auth->canDo("modPass"),  $indent+6);
         $this->_htmlInputField($cmd."_username",  "username",  $this->lang["user_name"],  $name,  $this->_auth->canDo("modName"),  $indent+6);
         $this->_htmlInputField($cmd."_usermail",  "usermail",  $this->lang["user_mail"],  $mail,  $this->_auth->canDo("modMail"),  $indent+6);
         $this->_htmlInputField($cmd."_usergroups","usergroups",$this->lang["user_groups"],$groups,$this->_auth->canDo("modGroups"),$indent+6);
@@ -709,13 +710,14 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
      * @return bool   true if meets requirements, false otherwise
      */
     protected function _verifyPassword($password, $confirm) {
+        global $lang;
 
         if (empty($password)) {
             return false;
         }
 
         if ($password !== $confirm) {
-            msg($this->lang['pass_confirm_fail'], -1);
+            msg($lang['regbadpass'], -1);
             return false;
         }
 
diff --git a/lib/plugins/usermanager/lang/en/lang.php b/lib/plugins/usermanager/lang/en/lang.php
index c18b5d684..b55ecc998 100644
--- a/lib/plugins/usermanager/lang/en/lang.php
+++ b/lib/plugins/usermanager/lang/en/lang.php
@@ -76,7 +76,3 @@ $lang['import_error_create']  = 'Unable to create the user';
 $lang['import_notify_fail']   = 'Notification message could not be sent for imported user, %s with email %s.';
 $lang['import_downloadfailures'] = 'Download Failures as CSV for correction';
 
-// added 2014-02
-$lang['user_passconfirm'] = 'Confirm Password';
-$lang['pass_confirm_fail'] = 'Passwords do not match';
-
-- 
GitLab