haraldronge / groupmanager

Groupmanager plugin for DokuWiki based on groupmgr
0 stars 3 forks source link

Username with dots #9

Open threadi opened 5 years ago

threadi commented 5 years ago

If a username contains a dot (e.g. "my.name") its impossible to save settings for this user.

Cause: The HTML-Code is run through the renderer which converts "my.name" to "my_name" for the input-hidden-field. After submitting the form the code checks for the unrendered username.


if (!$disabled && $_POST["id_" . $post_name]) {
                            if ($_POST[$post_chk]) {

My Solution for the moment: adding 2 lines before the POST is checked,

$post_name = str_replace(".", "_", $name);
$post_chk = str_replace(".", "_", $chk);
if (!$disabled && $_POST["id_" . $post_name]) {
                            if ($_POST[$post_chk]) { [..]
shimmtak commented 3 years ago

I struggled the same issue all day long, and confirmed the solution was work. I tried the plugin with Hogfather and it worked fine (without this issue).