Variable is undefined please use a proper ide in the future whoever did that

https://github.com/owncloud/core/commit/76b705602629e8ef6ff19176bcd81d92c9cdcad6 fixes the error in #12681

@schiesbn @derkostka Please test and review.
according to line 63 $name is the display name. Probably you need to replace $name with $user in line 57, add something like ```$name = OC_User::getDisplayName($user);``` and keep $user in this line