MantisBT: master 8216e93d

Author Committer Branch Timestamp Parent
dregad dregad master 2017-09-04 06:42:37 master f4137abe
Affected Issues  0023225: Token API does not work with config show show_realname

Fix REST API auth with show_realname = ON

When accessing the webservice via browser as an authenticated user, and
$g_show_realname = ON, the request fails with HTTP 403 error.

This is due to using incorrect user_get_name() function to retrieve the
user's login name.

Calling user_get_field(<id>, 'username') instead.

Fixes 0023225

mod - api/rest/restcore/AuthMiddleware.php Diff File