Don't encode.
Revert "Drastically reduce the calls to getValue()."

No wonder the calls are drastically reduced: the requested attributes are not
returned anymore, only the base attributes id, name and email.

This reverts commit abba424065d1634dff3184b28f7c7778e4a49ed4.
Add current user to the cache ID.

This avoids permission conflicts if different users run CLI scripts and web
scripts on the same Horde installation.
Fix scope.