Added friend functions to UserFunction
Merge remote-tracking branch 'origin/master'