Skip to content

Commit

Permalink
FIX-305: Fix global USER change during text filtering.
Browse files Browse the repository at this point in the history
  • Loading branch information
golenkovm authored and michael-milette committed Oct 8, 2024
1 parent 3d615ea commit 0f9e128
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1535,6 +1535,7 @@ Michael Milette - Author and Lead Developer

Big thank you to the following contributors. (Please let me know if I forgot to include you in the list):

* golenkovm (Micha Golenkov): FIx global USER change during text filtering (2024).
* 28Smiles (Leon Camus): Bug fix for {qrcode} and {urlencode} tags (2024).
* 28Smiles (Leon Camus): New {ifingouping} tag (2024).
* 28Smiles (Leon Camus): New {ifnotingrouping} tag (2024).
Expand Down
2 changes: 1 addition & 1 deletion classes/text_filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2379,7 +2379,7 @@ function ($matches) use ($now) {

// Substitutions.

$u = $USER;
$u = clone $USER;
if (!isloggedin() || isguestuser()) {
$u->firstname = get_string('defaultfirstname', 'filter_filtercodes');
$u->lastname = get_string('defaultsurname', 'filter_filtercodes');
Expand Down

0 comments on commit 0f9e128

Please sign in to comment.