MDL-41025 moodlelib: addressed todo on truncate_userinfo

This commit is contained in:
Sam Hemelryk
2013-08-05 09:34:55 +12:00
parent a31e811563
commit d89733f6c7
+2 -5
View 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,