Drupal code to access user credential in custom block

Job ID: 33844971

Budget: $15 – $25 USD

Basically, my requirement is to get a user credential [country name info] and pass this value as a parameter to the iframe object created in the page[drupal custom block]. The country name is needed based on the user role i.e. if the user is admin or manager role, then there is no need to get user credential, otherwise, get user credentials. I hope this could be achieved via JavaScript inside the page. Let me know
Eg of iframe object
<iframe allowfullscreen="true" frameborder="0" height="1800" src="https://abc.azurewebsites.net/home/EmbedReport?reportID=xxxxxx-xxx-xxxx-xxxxx&filter = county eq ‘India’" title="export" width="1180">
Related categories: JavaScript Drupal