]> git.mjollnir.org Git - moodle.git/commitdiff
Now firstname and lastname fields are trimmed before saving them to db.
authorstronk7 <stronk7>
Sat, 15 May 2004 22:18:53 +0000 (22:18 +0000)
committerstronk7 <stronk7>
Sat, 15 May 2004 22:18:53 +0000 (22:18 +0000)
This should close Bug 1235
(http://moodle.org/bugs/bug.php?op=show&bugid=1235)

user/edit.php

index 16ea08b8ccb38ec09500932adb69527da6c6d01d..19adfa2b1ec234e0ae61bc95b34af130b027f8b7 100644 (file)
@@ -55,8 +55,8 @@
             $usernew->$key = clean_text($usernew->$key, FORMAT_MOODLE);
         }
 
-        $usernew->firstname = strip_tags($usernew->firstname);
-        $usernew->lastname  = strip_tags($usernew->lastname);
+        $usernew->firstname = trim(strip_tags($usernew->firstname));
+        $usernew->lastname  = trim(strip_tags($usernew->lastname));
 
         if (isset($usernew->username)) {
             $usernew->username = trim(moodle_strtolower($usernew->username));