How do I add a super admin, either programmatically or directly through the database or another $new_user = array(
  'name' =&gt; 'Sg',
  'mail' =&gt; 'sg@email.com',
  'pass' =&gt; 'password123',
  'status' =&gt; 1,
  'field_custom_first_name' =&gt; array(LANGUAGE_NONE =&gt; array(array('value' =&gt;'S'))), // This becomes $account-&gt;field_custom_first_name[LANGUAGE_NONE][0]['value']
  'field_custom_last_name' =&gt; array(LANGUAGE_NONE =&gt; array(array('value' =&gt; 'Doe'))),
  'access' =&gt; REQUEST_TIME,
  'roles' =&gt; array(), // No other roles than Authenticated
 //'roles' =&gt; array('10' =&gt; '10', '11' =&gt; '11'), // If you want to specify additional roles, the numbers are role_id's
);
user_save(NULL, $new_user);


I've seen this above code but where should I implement this code? I tried adding it and I got the error: 


  user_save() is an undefined function.


I just need to be able to login to the system as a super-admin.
You have to create a super admin role(admin/people/permissions) and check all the boxes. And then you need to assign this role to the user.