Answers.Body: <p>You could use something like <code>CRM_Core_Permission::check('administer CiviCRM')</code> which returns true or false depending on if they have that permission.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-22T13:49:40.380Z
Answers.LastActivityDate: 2020-09-22T13:49:40.380Z
Answers.UserDisplayName: Demerit
Body: <p>I am using the hook_civicrm_tabset for rename the tab name. Tab rename code is working properly. But i want to add condition if user is admin then rename the tab name. How can i check user is admin in hook_civicrm_tabset hook.</p>
  
Tags: <hooks><civicrm-home>
Title: How can i check current user is administer in civicrm hook?
ThreadText: # How can i check current user is administer in civicrm hook?
  
  (Asked by: username_0 on 2020-09-22)
  
  I am using the hook\_civicrm\_tabset for rename the tab name. Tab rename code is working properly. But i want to add condition if user is admin then rename the tab name. How can i check user is admin in hook\_civicrm\_tabset hook.
  
  **Tags:** hooks, civicrm-home
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-09-22. Score: 1 | Accepted answer
  
  You could use something like `CRM_Core_Permission::check('administer CiviCRM')` which returns true or false depending on if they have that permission.
  
  
  ---
  
  