<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;DU8GQX4yeip7ImA9WhRVGU4.&quot;"><id>tag:blogger.com,1999:blog-5531726909074887208</id><updated>2012-01-18T17:50:20.092-08:00</updated><category term="roles" /><category term="user" /><title>Drupal HowTo</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://drupal-howtos.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://drupal-howtos.blogspot.com/" /><author><name>Uzbekjon</name><uri>http://www.blogger.com/profile/05106688925204046678</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://3.bp.blogspot.com/_sI8p6ZI7pJ0/SToU-rzQgaI/AAAAAAAAABg/ojvW0d-JIms/S220/uzbekjohn.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/DrupalHowto" /><feedburner:info uri="drupalhowto" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;DUUBSXsyeyp7ImA9WxJXEE4.&quot;"><id>tag:blogger.com,1999:blog-5531726909074887208.post-6790107840223710950</id><published>2009-02-06T03:00:00.001-08:00</published><updated>2009-06-03T06:54:18.593-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-03T06:54:18.593-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="roles" /><category scheme="http://www.blogger.com/atom/ns#" term="user" /><title>How to find what roles user has in Drupal</title><content type="html">&lt;p&gt;User object in Drupal has a roles array and all you have to do is to check if this array has the role you want.&lt;/p&gt;  &lt;p&gt;Here is an example:&lt;/p&gt;  &lt;div class="code php"&gt;   &lt;pre&gt;&amp;lt;?php&lt;br /&gt;  global $user;&lt;br /&gt;  $user-&amp;gt;roles[ &amp;quot;ROLE_ID&amp;quot; ] = &amp;quot;ROLE_NAME&amp;quot;;&lt;br /&gt;&lt;br /&gt;  // You can traverse through the array&lt;br /&gt;  // and check if user has the role you want&lt;br /&gt;  foreach($user-&amp;gt;roles as $rid =&amp;gt; $role){&lt;br /&gt;    if($role == &amp;quot;role_i_want&amp;quot;){&lt;br /&gt;      // Do something&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;?&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5531726909074887208-6790107840223710950?l=drupal-howtos.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DrupalHowto/~4/DZof7Tf86L0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://drupal-howtos.blogspot.com/feeds/6790107840223710950/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://drupal-howtos.blogspot.com/2009/02/how-to-find-what-roles-use-has-in.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5531726909074887208/posts/default/6790107840223710950?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5531726909074887208/posts/default/6790107840223710950?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DrupalHowto/~3/DZof7Tf86L0/how-to-find-what-roles-use-has-in.html" title="How to find what roles user has in Drupal" /><author><name>Uzbekjon</name><uri>http://www.blogger.com/profile/05106688925204046678</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://3.bp.blogspot.com/_sI8p6ZI7pJ0/SToU-rzQgaI/AAAAAAAAABg/ojvW0d-JIms/S220/uzbekjohn.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://drupal-howtos.blogspot.com/2009/02/how-to-find-what-roles-use-has-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkAEQ38-eip7ImA9WxVQE0Q.&quot;"><id>tag:blogger.com,1999:blog-5531726909074887208.post-7016341050660518956</id><published>2009-01-31T00:30:00.000-08:00</published><updated>2009-01-31T00:31:42.152-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-31T00:31:42.152-08:00</app:edited><title>Drupal Howto's resouce</title><content type="html">Here I will be posting my Drupal howto's and tips. Also, here you can find Drupal tutorials, custom modules and more.&lt;br /&gt;&lt;br /&gt;Stay tuned!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5531726909074887208-7016341050660518956?l=drupal-howtos.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DrupalHowto/~4/lMNV525yl3Y" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://drupal-howtos.blogspot.com/feeds/7016341050660518956/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://drupal-howtos.blogspot.com/2009/01/drupal-howtos-resouce.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5531726909074887208/posts/default/7016341050660518956?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5531726909074887208/posts/default/7016341050660518956?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DrupalHowto/~3/lMNV525yl3Y/drupal-howtos-resouce.html" title="Drupal Howto's resouce" /><author><name>Uzbekjon</name><uri>http://www.blogger.com/profile/05106688925204046678</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://3.bp.blogspot.com/_sI8p6ZI7pJ0/SToU-rzQgaI/AAAAAAAAABg/ojvW0d-JIms/S220/uzbekjohn.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://drupal-howtos.blogspot.com/2009/01/drupal-howtos-resouce.html</feedburner:origLink></entry></feed>

