diff options
Diffstat (limited to 'lib/plugins/authmysql')
-rw-r--r-- | lib/plugins/authmysql/auth.php | 19 | ||||
-rw-r--r-- | lib/plugins/authmysql/lang/da/settings.php | 4 | ||||
-rw-r--r-- | lib/plugins/authmysql/lang/en/lang.php | 13 | ||||
-rw-r--r-- | lib/plugins/authmysql/lang/es/settings.php | 5 |
4 files changed, 39 insertions, 2 deletions
diff --git a/lib/plugins/authmysql/auth.php b/lib/plugins/authmysql/auth.php index 0d423b6c9..1b7d0bfa4 100644 --- a/lib/plugins/authmysql/auth.php +++ b/lib/plugins/authmysql/auth.php @@ -222,6 +222,7 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { if($this->_openDB()) { if(($info = $this->_getUserInfo($user)) !== false) { + msg($this->getLang('userexists'), -1); return false; // user already exists } @@ -235,7 +236,13 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { $rc = $this->_addUser($user, $pwd, $name, $mail, $grps); $this->_unlockTables(); $this->_closeDB(); - if($rc) return true; + if(!$rc) { + msg($this->getLang('writefail')); + return null; + } + return true; + } else { + msg($this->getLang('connectfail'), -1); } return null; // return error } @@ -279,7 +286,9 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { $rc = $this->_updateUserInfo($user, $changes); - if($rc && isset($changes['grps']) && $this->cando['modGroups']) { + if(!$rc) { + msg($this->getLang('usernotexists'), -1); + } elseif(isset($changes['grps']) && $this->cando['modGroups']) { $groups = $this->_getGroups($user); $grpadd = array_diff($changes['grps'], $groups); $grpdel = array_diff($groups, $changes['grps']); @@ -295,10 +304,14 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { $rc = false; } } + + if(!$rc) msg($this->getLang('writefail')); } $this->_unlockTables(); $this->_closeDB(); + } else { + msg($this->getLang('connectfail'), -1); } return $rc; } @@ -328,6 +341,8 @@ class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { $this->_unlockTables(); } $this->_closeDB(); + } else { + msg($this->getLang('connectfail'), -1); } return $count; } diff --git a/lib/plugins/authmysql/lang/da/settings.php b/lib/plugins/authmysql/lang/da/settings.php index ed21201fb..5fd66dbad 100644 --- a/lib/plugins/authmysql/lang/da/settings.php +++ b/lib/plugins/authmysql/lang/da/settings.php @@ -5,6 +5,7 @@ * * @author Jens Hyllegaard <jens.hyllegaard@gmail.com> * @author soer9648 <soer9648@eucl.dk> + * @author Jacob Palm <mail@jacobpalm.dk> */ $lang['server'] = 'Din MySQL server'; $lang['user'] = 'MySQL brugernavn'; @@ -12,8 +13,11 @@ $lang['password'] = 'Kodeord til ovenstående bruger'; $lang['database'] = 'Database der skal benyttes'; $lang['charset'] = 'Tegnsæt benyttet i database'; $lang['debug'] = 'Vis yderligere debug output'; +$lang['forwardClearPass'] = 'Videregiv bruger adgangskoder i klar tekst til nedenstående SQL statement, i stedet for at benytte passcrypt'; +$lang['TablesToLock'] = 'Kommasepareret liste over tabeller der skal låses under skrivning'; $lang['checkPass'] = 'SQL-sætning til at kontrollere kodeord'; $lang['getUserInfo'] = 'SQL-sætning til at hente brugerinformation'; +$lang['getGroups'] = 'SQL statement til at bestemme en brugers medlemskab af grupper'; $lang['getUsers'] = 'SQL-sætning til at liste alle brugere'; $lang['addUser'] = 'SQL-sætning til at tilføje en ny bruger'; $lang['addGroup'] = 'SQL-sætning til at tilføje en ny gruppe'; diff --git a/lib/plugins/authmysql/lang/en/lang.php b/lib/plugins/authmysql/lang/en/lang.php new file mode 100644 index 000000000..8313616c6 --- /dev/null +++ b/lib/plugins/authmysql/lang/en/lang.php @@ -0,0 +1,13 @@ +<?php +/** + * English language file for authmysql plugin + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + */ + +$lang['connectfail'] = 'Failed to connect to database.'; +$lang['userexists'] = 'Sorry, a user with this login already exists.'; +$lang['usernotexists'] = 'Sorry, that user doesn\'t exist.'; +$lang['writefail'] = 'Unable to modify user data. Please inform the Wiki-Admin'; + +//Setup VIM: ex: et ts=4 : diff --git a/lib/plugins/authmysql/lang/es/settings.php b/lib/plugins/authmysql/lang/es/settings.php index b82620fc6..cda3c23f8 100644 --- a/lib/plugins/authmysql/lang/es/settings.php +++ b/lib/plugins/authmysql/lang/es/settings.php @@ -6,6 +6,7 @@ * @author Antonio Bueno <atnbueno@gmail.com> * @author Eloy <ej.perezgomez@gmail.com> * @author Antonio Castilla <antoniocastilla@trazoide.com> + * @author Alejandro Nunez <nunez.alejandro@gmail.com> */ $lang['server'] = 'Tu servidor MySQL'; $lang['user'] = 'Nombre de usuario MySQL'; @@ -32,6 +33,10 @@ $lang['getUserID'] = 'Sentencia SQL para obtener la clave primaria d $lang['delUser'] = 'Sentencia SQL para eliminar un usuario'; $lang['delUserRefs'] = 'Sentencia SQL para eliminar un usuario de todos los grupos'; $lang['updateUser'] = 'Sentencia SQL para actualizar un perfil de usuario'; +$lang['UpdateLogin'] = 'Cláusula de actualización para actualizar el login del usuario'; +$lang['UpdatePass'] = 'Cláusula de actualización para actualizar la contraseña del usuario'; +$lang['UpdateEmail'] = 'Cláusula de actualización para actualizar la dirección de correo del usuario'; +$lang['UpdateName'] = 'Cláusula de actualización para actualizar el nomblre completo del usuario'; $lang['delUserGroup'] = 'Sentencia SQL para eliminar un usuario de un grupo dado'; $lang['getGroupID'] = 'Sentencia SQL para obtener la clave principal de un grupo dado'; $lang['debug_o_0'] = 'ninguno'; |