Platforms to show: All Mac Windows Linux Cross-Platform

Back to CSIdentityQueryMBS class.

CSIdentityQueryMBS.Available as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Collaboration MBS MacFrameworks Plugin 13.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Whether the CSIdentityQuery functions are available.
Example
if not CSIdentityQueryMBS.Available then
MsgBox "not supported."
end if

CSIdentityQueryMBS.Create(identityClass as Integer, authority as CSIdentityAuthorityMBS) as CSIdentityQueryMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Collaboration MBS MacFrameworks Plugin 13.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates an identity query object for all identities in the specified authority.
Example
dim c as CSIdentityQueryMBS = CSIdentityQueryMBS.Create(CSIdentityMBS.kCSIdentityClassUser, CSIdentityAuthorityMBS.localIdentityAuthority)

if c.Execute then
dim a() as CSIdentityMBS = c.Results

dim names() as string
for each p as CSIdentityMBS in a
names.append p.fullName
next

MsgBox join(names,EndOfLine)
end if

identityClass: The class of identity to find
authority: The identity authority to query

Returns a new CSIdentityQuery object.

The results of this query include all of the identities in the specified authority's database.

CSIdentityQueryMBS.CreateForCurrentUser as CSIdentityQueryMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Collaboration MBS MacFrameworks Plugin 13.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates a query for the current session user's identity.
Example
dim q as CSIdentityQueryMBS = CSIdentityQueryMBS.CreateForCurrentUser

if q.Execute then
dim r() as CSIdentityMBS = q.Results

if UBound(r) = 0 then
dim i as CSIdentityMBS = r(0)

MsgBox i.fullName
end if
end if

CSIdentityQueryMBS.CreateForName(name as string, comparisonMethod as Integer, identityClass as Integer, authority as CSIdentityAuthorityMBS) as CSIdentityQueryMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Collaboration MBS MacFrameworks Plugin 13.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates an identity query object based on a name.
Example
// search for short name and show full name
dim name as string = SystemInformationMBS.ShortUsername
dim a as CSIdentityAuthorityMBS = CSIdentityAuthorityMBS.defaultIdentityAuthority
dim f as Integer = CSIdentityQueryMBS.kCSIdentityQueryStringEquals
dim q as CSIdentityQueryMBS = CSIdentityQueryMBS.CreateForName(name, f, CSIdentityMBS.kCSIdentityClassUser, a)

if q.Execute then
dim r() as CSIdentityMBS = q.Results
MsgBox r(0).fullName
end if

name: The name criteria for the query.
comparisonMethod: The comparision function (equal or begins with)
identityClass: The class of identity to find
authority: The identity authority to query

Returns a new CSIdentityQuery object
The query finds identities by name. It searches the full names, posix names and aliases for matches.

CSIdentityQueryMBS.CreateForPersistentReference(data as memoryblock) as CSIdentityQueryMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Collaboration MBS MacFrameworks Plugin 13.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates an identity query object based on an identity reference data object.
Example
// get a reference
dim u as CSIdentityMBS = CSIdentityMBS.CurrentUser
dim p as MemoryBlock = u.PersistentReference
u = nil

// and search back later:
dim q as CSIdentityQueryMBS = CSIdentityQueryMBS.CreateForPersistentReference(p)
if q.Execute then
dim r() as CSIdentityMBS = q.Results
MsgBox r(0).fullName
end if

referenceData: The reference data that fully describes an identity
Returns a new CSIdentityQuery object.
Finds an identity by reference data obtained from ReferenceData.

CSIdentityQueryMBS.CreateForPosixID(posixID as Integer, identityClass as Integer, authority as CSIdentityAuthorityMBS) as CSIdentityQueryMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Collaboration MBS MacFrameworks Plugin 13.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates an identity query object based on a POSIX ID.
Example
// search for short name and show full name
dim a as CSIdentityAuthorityMBS = CSIdentityAuthorityMBS.defaultIdentityAuthority
dim f as Integer = CSIdentityQueryMBS.kCSIdentityQueryStringEquals
dim q as CSIdentityQueryMBS = CSIdentityQueryMBS.CreateForPosixID(501, CSIdentityMBS.kCSIdentityClassUser, a)

if q.Execute then
dim r() as CSIdentityMBS = q.Results
MsgBox r(0).fullName
end if

posixID: The UID or GID of the identity to find
identityClass: The class of identity to find
authority: The identity authority to query

Returns a new CSIdentityQuery object
Finds an identity by its UID or GID

CSIdentityQueryMBS.CreateForUUID(uuid as string, authority as CSIdentityAuthorityMBS) as CSIdentityQueryMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Collaboration MBS MacFrameworks Plugin 13.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates an identity query object based on a UUID.

uuid: The UUID of the identity to find
authority: The identity authority to query
Returns a new CSIdentityQuery object
Finds an identity by its UUID.

The items on this page are in the following plugins: MBS MacFrameworks Plugin.


The biggest plugin in space...