--- modules/user/user.module.orginalny	2011-01-14 12:11:39.338518760 +0100
+++ modules/user/user.module	2011-01-14 12:31:05.510529655 +0100
@@ -1503,6 +1503,29 @@ function user_register_access() {
 }
 
 /**
+ * check is user have particular role or roles
+ * 
+ * @param $roles
+ *   string with one role (e.g. 'employee') or array of roles
+ * 
+ * @return
+ *   TRUE if have, FALSE otherwise
+ */
+function user_is($roles) {
+  global $user;
+
+  if(is_array($roles)) {
+    foreach($roles as $role) {
+      if(in_array($role, array_values($user->roles))) {
+        return TRUE;
+      }
+    }
+  } else {
+    return in_array($roles, array_values($user->roles));
+  }
+}
+
+/**
  * User view access callback.
  *
  * @param $account
