public function getAuthRoleName($role = null) {
		$role = (int)$role;
		$result = '';
		if ($role === 0) {
			return $result;
		}

		$roleNames = $this->_getAuthFieldsList('name');
		if (empty($roleNames)) {
			return $result;
		}

		if (!krsort($roleNames)) {
			return $result;
		}

		foreach ($roleNames as $roleMask => $roleName) {
			if (($role & $roleMask) === $roleMask) {
				$result = $roleName;
				break;
			}
		}

		return $result;
	}
public function getAuthRoleName($role = null) {
		$role = (int)$role;
		$result = '';
		if ($role === 0) {
			return $result;
		}

		$roleNames = $this->_getAuthFieldsList('name');
		if (empty($roleNames)) {
			return $result;
		}

		if (!krsort($roleNames)) {
			return $result;
		}

		foreach ($roleNames as $roleMask => $roleName) {
			if (($role & $roleMask) === $roleMask) {
				$result = $roleName;
				break;
			}
		}

		return $result;
	}
public function getAuthRoleName ( $ role = null ) { $ role = ( int ) $ role ; $ result = '' ; if ( $ role === 0 ) { return $ result ; } $ roleNames = $ this -> _getAuthFieldsList ( 'name' ) ; if ( empty ( $ roleNames ) ) { return $ result ; } if ( ! krsort ( $ roleNames ) ) { return $ result ; } foreach ( $ roleNames as $ roleMask => $ roleName ) { if ( ( $ role & $ roleMask ) === $ roleMask ) { $ result = $ roleName ; break ; } } return $ result ; }
Get name for user role

@param int $role Bit mask of user role.
@return string Name of user role.
Get name for user role