mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
Clean all data in user profile
This commit is contained in:
parent
aeb23d0a02
commit
999beee0b6
1 changed files with 6 additions and 0 deletions
|
@ -46,8 +46,14 @@
|
||||||
/// If data submitted, then process and store.
|
/// If data submitted, then process and store.
|
||||||
|
|
||||||
if ($usernew = data_submitted()) {
|
if ($usernew = data_submitted()) {
|
||||||
|
|
||||||
|
foreach ($usernew as $key => $data) {
|
||||||
|
$usernew->$key = clean_text($usernew->$key, FORMAT_MOODLE);
|
||||||
|
}
|
||||||
|
|
||||||
$usernew->firstname = strip_tags($usernew->firstname);
|
$usernew->firstname = strip_tags($usernew->firstname);
|
||||||
$usernew->lastname = strip_tags($usernew->lastname);
|
$usernew->lastname = strip_tags($usernew->lastname);
|
||||||
|
|
||||||
if (isset($usernew->username)) {
|
if (isset($usernew->username)) {
|
||||||
$usernew->username = trim(moodle_strtolower($usernew->username));
|
$usernew->username = trim(moodle_strtolower($usernew->username));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue