lucee.Componentcontentbox.models.BaseEntityMethods
contentbox.models.BaseEntity
contentbox.models.security.Author
ContentBox - A Modular Content Platform Copyright since 2012 by Ortus Solutions, Corp www.ortussolutions.com/products/contentbox --- I am a ContentBox User/Author entity
Property Summary | ||||
---|---|---|---|---|
type | property | default | serializable | required |
any
|
authorID
|
true
|
false
|
|
any
|
authorService
|
true
|
false
|
|
any
|
avatar
|
true
|
false
|
|
any
|
biography
|
true
|
false
|
|
date
|
createdDate
|
true
|
false
|
|
any
|
email
|
true
|
false
|
|
array
|
entries
|
true
|
false
|
|
any
|
firstName
|
true
|
false
|
|
any
|
is2FactorAuth
|
false
|
true
|
false
|
any
|
isActive
|
false
|
true
|
false
|
any
|
isDeleted
|
false
|
true
|
false
|
any
|
isPasswordReset
|
false
|
true
|
false
|
any
|
lastLogin
|
true
|
false
|
|
any
|
lastName
|
true
|
false
|
|
boolean
|
loggedIn
|
false
|
true
|
false
|
date
|
modifiedDate
|
true
|
false
|
|
array
|
pages
|
true
|
false
|
|
any
|
password
|
true
|
false
|
|
array
|
permissionGroups
|
true
|
false
|
|
any
|
permissionList
|
true
|
false
|
|
array
|
permissions
|
true
|
false
|
|
any
|
preferences
|
true
|
false
|
|
any
|
role
|
true
|
false
|
|
any
|
username
|
true
|
false
|
Constructor Summary | |
---|---|
init()
Constructor. |
Method Summary | |
---|---|
any
|
addEntry(any entry)
|
any
|
addPage(any page)
|
Author
|
addPermissionGroup(any group)
Add both sides of this relationship: PermissionGroup <-> Author. |
any
|
addPermissions(any permissions)
|
boolean
|
checkGroupPermissions(any slug)
This utility function checks if a slug is in any permission group this user belongs to. |
Author
|
clearPermissionGroups()
Remove all permission groups. |
Author
|
clearPermissions()
Remove all permissions. |
struct
|
getAllPreferences()
Get all user preferences in inflated format. |
string
|
getAuthorID()
|
string
|
getAuthorService()
|
string
|
getAvatar()
|
string
|
getAvatarLink([numeric size='40'])
Get the avatar link for this user. |
string
|
getBiography()
|
string
|
getDisplayLastLogin([any dateFormat='[runtime expression]'], [any timeFormat='[runtime expression]'])
Get formatted lastLogin. |
string
|
getEmail()
|
string
|
getEntries()
|
string
|
getFirstName()
|
string
|
getFullName()
Retrieve full name. |
struct
|
getInfoSnapshot()
Utility method to get a snapshot of the user information. |
string
|
getIs2FactorAuth()
|
string
|
getIsActive()
|
string
|
getIsPasswordReset()
|
struct
|
getJwtCustomClaims()
A struct of custom claims to add to the JWT token. |
array
|
getJwtScopes()
This function returns an array of all the scopes that should be attached to the JWT token that will be used for authorization. |
string
|
getLastLogin()
|
string
|
getLastName()
|
string
|
getLoggedIn()
|
numeric
|
getNumberOfContent()
Get the total number of content items this author has created. |
numeric
|
getNumberOfContentStore()
Get the total number of content store items this author has created. |
numeric
|
getNumberOfEntries()
Get the total number of entries this author has created. |
numeric
|
getNumberOfPages()
Get the total number of pages this author has created. |
string
|
getPages()
|
string
|
getPassword()
|
string
|
getPermissionGroups()
|
string
|
getPermissionGroupsList([any delimiter=','])
Shortcut Utlity function to get a list of all the permission groups this user belongs to. |
string
|
getPermissionList()
|
string
|
getPermissions()
|
any
|
getPreference(any name, [any defaultValue])
Get a preference, you can pass a default value if preference does not exist. |
string
|
getPreferences()
|
string
|
getRole()
|
string
|
getRoleName()
Get the user's role name. |
string
|
getUsername()
|
boolean
|
hasEntry([any entry])
|
boolean
|
hasPage([any page])
|
boolean
|
hasPermission(any permission)
Verify if the author has one or more of the passed in permissions. |
boolean
|
hasPermissionGroup([any permissionGroup])
|
boolean
|
hasPermissions([any permissions])
|
boolean
|
hasRole([any role])
|
any
|
inPermissionList(any permission)
Verify the incoming permission is assigned in this user. |
any
|
isLoggedIn()
Utility method to verify if an author has been logged in to the system or not. |
boolean
|
removeEntry(any entry)
|
boolean
|
removePage(any page)
|
Author
|
removePermissionGroup(any group)
Remove both sides of this relationship: PermissionGroup <-> Author. |
boolean
|
removePermissions(any permissions)
|
any
|
setAuthorID(any authorID)
|
any
|
setAuthorService(any authorService)
|
any
|
setAvatar(any avatar)
|
any
|
setBiography(any biography)
|
any
|
setEmail(any email)
|
any
|
setEntries(array entries)
|
any
|
setFirstName(any firstName)
|
any
|
setIs2FactorAuth(any is2FactorAuth)
|
any
|
setIsActive(any isActive)
|
any
|
setIsPasswordReset(any isPasswordReset)
|
any
|
setLastLogin(any lastLogin)
|
any
|
setLastName(any lastName)
|
any
|
setLoggedIn(boolean loggedIn)
|
any
|
setPages(array pages)
|
any
|
setPassword(any password)
|
any
|
setPermissionGroups(array permissionGroups)
|
any
|
setPermissionList(any permissionList)
|
Author
|
setPermissions(array permissions)
Override the setPermissions. |
Author
|
setPreference(any name, any value)
Set a preference in the user preferences. |
Author
|
setPreferences(any preferences)
Store a preferences structure or JSON data in the user prefernces. |
any
|
setRole(any role)
|
any
|
setUsername(any username)
|
Methods inherited from class contentbox.models.BaseEntity |
---|
getCreatedDate, getIsDeleted, getModifiedDate, setCreatedDate, setIsDeleted, setModifiedDate |
Methods inherited from class contentbox.models.BaseEntityMethods |
---|
appendToMemento, appendToMementoProfile, arrayWrap, getDisplayCreatedDate, getDisplayModifiedDate, getEntityName, getId, includeMixin, isLoaded, preInsert, preUpdate |
Methods inherited from class lucee.Component |
---|
None |
Constructor Detail |
---|
Constructor
Property Detail |
---|
access
- publicrequired
- falsefieldtype
- idreturntype
- anycolumn
- authorIDormtype
- stringupdate
- falsegenerator
- uuidlength
- 36serializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- provider:authorService@contentboxpersistent
- falseserializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- provider:Avatar@contentboxpersistent
- falseserializable
- trueaccess
- publicrequired
- falsereturntype
- anycolumn
- biographynotnull
- falseormtype
- textlength
- 8000serializable
- trueaccess
- publicrequired
- falsereturntype
- anycolumn
- createdDatenotnull
- trueormtype
- timestampupdate
- falsepersistent
- trueserializable
- trueaccess
- publicrequired
- falsereturntype
- anycolumn
- emailnotnull
- trueindex
- idx_emaillength
- 255serializable
- trueaccess
- publicrequired
- falseinverse
- truefieldtype
- one-to-manyreturntype
- anycascade
- save-updateorderby
- publishedDate DESCbatchsize
- 10singularname
- entryfkcolumn
- FK_authorIDserializable
- truecfc
- contentbox.models.content.Entrylazy
- trueaccess
- publicrequired
- falsereturntype
- anycolumn
- firstNamenotnull
- truelength
- 100serializable
- trueaccess
- publicrequired
- falsereturntype
- anycolumn
- is2FactorAuthnotnull
- trueormtype
- booleanindex
- idx_2factorauthserializable
- trueaccess
- publicrequired
- falsereturntype
- anycolumn
- isActivenotnull
- trueormtype
- booleanindex
- idx_login,idx_activeAuthorserializable
- trueaccess
- publicrequired
- falsereturntype
- anycolumn
- isDeletednotnull
- trueormtype
- booleanpersistent
- trueserializable
- trueaccess
- publicrequired
- falsereturntype
- anycolumn
- isPasswordResetnotnull
- trueormtype
- booleanindex
- idx_passwordResetserializable
- trueaccess
- publicrequired
- falsereturntype
- anycolumn
- lastLoginnotnull
- falseormtype
- timestampserializable
- trueaccess
- publicrequired
- falsereturntype
- anycolumn
- lastNamenotnull
- truelength
- 100serializable
- trueaccess
- publicrequired
- falsereturntype
- anypersistent
- falseserializable
- trueaccess
- publicrequired
- falsereturntype
- anycolumn
- modifiedDatenotnull
- trueormtype
- timestamppersistent
- trueserializable
- trueaccess
- publicrequired
- falseinverse
- truefieldtype
- one-to-manyreturntype
- anycascade
- save-updateorderby
- publishedDate DESCbatchsize
- 10singularname
- pagefkcolumn
- FK_authorIDserializable
- truecfc
- contentbox.models.content.Pagelazy
- trueaccess
- publicrequired
- falsereturntype
- anycolumn
- passwordnotnull
- trueindex
- idx_loginlength
- 100serializable
- truelinktable
- cb_authorPermissionGroupsaccess
- publicrequired
- falseinverse
- truefieldtype
- many-to-manyreturntype
- anycascade
- allorderby
- namesingularname
- permissionGroupfkcolumn
- FK_authorIDserializable
- trueinversejoincolumn
- FK_permissionGroupIDcfc
- contentbox.models.security.PermissionGrouplazy
- trueaccess
- publicrequired
- falsereturntype
- anypersistent
- falseserializable
- truelinktable
- cb_authorPermissionsaccess
- publicrequired
- falsefieldtype
- many-to-manyreturntype
- anycascade
- save-updateorderby
- permissionfkcolumn
- FK_authorIDserializable
- trueinversejoincolumn
- FK_permissionIDcfc
- contentbox.models.security.Permissionlazy
- trueaccess
- publicrequired
- falsereturntype
- anycolumn
- preferencesnotnull
- falseormtype
- textlength
- 8000serializable
- trueaccess
- publicrequired
- falsefieldtype
- many-to-onereturntype
- anynotnull
- truefkcolumn
- FK_roleIDserializable
- truecfc
- contentbox.models.security.Rolelazy
- trueaccess
- publicunique
- truerequired
- falsereturntype
- anycolumn
- usernamenotnull
- trueindex
- idx_loginlength
- 100serializable
- trueMethod Detail |
---|
entry
page
Add both sides of this relationship: PermissionGroup <-> Author
group
- The permission group to addpermissions
This utility function checks if a slug is in any permission group this user belongs to.
slug
- The slug to checkRemove all permission groups
Remove all permissions
Get all user preferences in inflated format
Get the avatar link for this user.
size
- The size of the avatar, defaults to 40Get formatted lastLogin
dateFormat
timeFormat
Retrieve full name
Utility method to get a snapshot of the user information
A struct of custom claims to add to the JWT token
This function returns an array of all the scopes that should be attached to the JWT token that will be used for authorization.
Get the total number of content items this author has created
Get the total number of content store items this author has created
Get the total number of entries this author has created
Get the total number of pages this author has created
Shortcut Utlity function to get a list of all the permission groups this user belongs to.
delimiter
Get a preference, you can pass a default value if preference does not exist
name
defaultValue
Get the user's role name
entry
page
Verify if the author has one or more of the passed in permissions
permission
- One or a list of permissions to check for accesspermissionGroup
permissions
role
Verify the incoming permission is assigned in this user
permission
- A list or array of permission to checkUtility method to verify if an author has been logged in to the system or not. This method does not account for permissions. Only for logged in status.
entry
page
Remove both sides of this relationship: PermissionGroup <-> Author
group
- The permission group to addpermissions
authorID
authorService
avatar
biography
email
entries
firstName
is2FactorAuth
isActive
isPasswordReset
lastLogin
lastName
loggedIn
pages
password
permissionGroups
permissionList
Override the setPermissions
permissions
- The permissions array to overrideSet a preference in the user preferences
name
value
Store a preferences structure or JSON data in the user prefernces
preferences
- A struct of data or a JSON packet to storerole
username