MDL-41025 moodlelib: addressed todo on truncate_userinfo
authorSam Hemelryk <sam@moodle.com>
Sun, 4 Aug 2013 21:34:55 +0000 (09:34 +1200)
committerSam Hemelryk <sam@moodle.com>
Sun, 4 Aug 2013 21:34:55 +0000 (09:34 +1200)
lib/moodlelib.php

index c190a82..47bc1a3 100644 (file)
@@ -4111,15 +4111,12 @@ function update_user_record($username) {
 }
 
 /**
- * Will truncate userinfo as it comes from auth_get_userinfo (from external auth)
- * which may have large fields
- *
- * @todo Add vartype handling to ensure $info is an array
+ * Will truncate userinfo as it comes from auth_get_userinfo (from external auth) which may have large fields.
  *
  * @param array $info Array of user properties to truncate if needed
  * @return array The now truncated information that was passed in
  */
-function truncate_userinfo($info) {
+function truncate_userinfo(array $info) {
     // Define the limits.
     $limit = array(
         'username'    => 100,