GetUserTypes() 공개 정적인 메소드

Get all the user types with the exception of those with the Reader permission.
public static GetUserTypes ( ) : array
리턴 array An array of UserType objects.
예제 #1
0
 /**
  * Get the user type that matches the given config variables.
  *
  * @param array
  *    $p_configVars An array of permissions variables
  *
  * @return mixed
  *    bool False The config passed does not match any user type
  *    object $userType The user type object matching
  */
 public static function GetUserTypeFromConfig($p_configVars)
 {
     global $LiveUserAdmin;
     if (!is_array($p_configVars) || count($p_configVars) == 0) {
         return false;
     }
     $configVarsSize = sizeof($p_configVars);
     $userTypes = UserType::GetUserTypes();
     foreach ($userTypes as $userType) {
         $uTypeConfigSize = sizeof($userType->m_config);
         if ($configVarsSize > $uTypeConfigSize) {
             $diff = array_diff_key($p_configVars, $userType->m_config);
         } else {
             $diff = array_diff_key($userType->m_config, $p_configVars);
         }
         if (sizeof($diff) == 0) {
             return $userType;
         }
     }
     return false;
 }
예제 #2
0
$fields = array('UName', 'Name', 'Title', 'Gender', 'Age', 'EMail', 'City', 'StrAddress',
	'State', 'CountryCode', 'Phone', 'Fax', 'Contact', 'Phone2', 'PostalCode', 'Employer',
	'EmployerType', 'Position');
if ($isNewUser) {
	$action = 'do_add.php';
	foreach ($fields as $index=>$field) {
		$$field = Input::Get($field, 'string', '');
	}
} else {
	$action = 'do_edit.php';
	foreach ($fields as $index=>$field) {
		$$field = $editUser->getProperty($field);
	}
}
$userTypes = UserType::GetUserTypes();
$countries = Country::GetCountries(1);
$my_user_type = $editUser->getUserType();

?>
<script type="text/javascript" src="<?php echo $Campsite['WEBSITE_URL']; ?>/js/campsite.js"></script>

<script type="text/javascript" src="<?php echo $Campsite['WEBSITE_URL']; ?>/js/pwd_meter/js/pwd_meter_min.js"></script>
<script type="text/javascript" src="<?php echo $Campsite['WEBSITE_URL']; ?>/js/pwd_meter/js/pwd_generator_min.js"></script>
<link href="<?php echo $Campsite['WEBSITE_URL']; ?>/js/pwd_meter/css/default.css" rel="stylesheet" type="text/css" />


<form name="user_add" method="POST" action="<?php echo $action; ?>" onsubmit="return <?php camp_html_fvalidate(); ?>;">
<?php echo SecurityToken::FormParameter(); ?>
<input type="hidden" name="uType" value="<?php echo $uType; ?>">
<?php