Progress bar based on role
You can read user roles using below code...

global $user;
$user_roles = $user-&gt;roles;
$progress_value = x * 5; // where x is value extracted from $user_roles
if( is_numeric($progress_value) &amp;&amp; $progress_value &gt; 0 &amp;&amp; $progress_value &lt;= 100 ) {
  $style = "width: ".round($progress_value)."%; display: block";
}
print '&lt;div id="progress-wrapper"&gt;
  &lt;div id="progress-value" style="&lt;?php print $style; ?&gt;"&gt;&lt;/div&gt;
&lt;div&gt;';


Now the solution needs some CSS to make it look like a progress bar. Start with a basic style - just a black border with a gray filling:

&lt;style&gt;
#progress-wrapper {
  border: 1px solid #000000;
  background-color: transparent;
  width: 100px;
  height: 16px;
}
#progress-value {
  background-color: #acacac;
  height: 16px;
}
&lt;/style&gt;