@v_risalab You can use the hook filter:account/profile.build to add data to the page.
https://github.com/NodeBB/NodeBB/blob/master/src/middleware/render.js#L36
You can use the same code from the info controller to get the ban data.
https://github.com/NodeBB/NodeBB/blob/master/src/controllers/accounts/info.js#L22