MODX Revolution Object Cheat Sheet: modUser

MODX Revolution Object Cheat Sheet: modUser

modUser database table fields, schema definitions, and relationships: aggregate, composite, ancestral. Also provides default object values.

Posted on February 02, 2015 at 15:35:00
Tags: Cheatsheet
Words: 626
Level: Advanced
Dependencies: xPDO

modUser (2.6.5-pl)

Table Fields



    [id] => 
    [username] => 
    [password] => 
    [cachepwd] => 
    [class_key] => modUser
    [active] => 1
    [remote_key] => 
    [remote_data] => 
    [hash_class] => hashing.modPBKDF2
    [salt] => 
    [primary_group] => 0
    [session_stale] => 
    [sudo] => 0
    [createdon] => 0

Validation Rules




Index Meta



    [PRIMARY] => 
        
            [alias] => PRIMARY
            [primary] => 1
            [unique] => 1
            [type] => BTREE
            [columns] => 
                
                    [id] => 
                        
                            [length] => 
                            [collation] => A
                            [null] => 
                        

                

        

    [username] => 
        
            [alias] => username
            [primary] => 
            [unique] => 1
            [type] => BTREE
            [columns] => 
                
                    [username] => 
                        
                            [length] => 
                            [collation] => A
                            [null] => 
                        

                

        

    [class_key] => 
        
            [alias] => class_key
            [primary] => 
            [unique] => 
            [type] => BTREE
            [columns] => 
                
                    [class_key] => 
                        
                            [length] => 
                            [collation] => A
                            [null] => 
                        

                

        

    [remote_key] => 
        
            [alias] => remote_key
            [primary] => 
            [unique] => 
            [type] => BTREE
            [columns] => 
                
                    [remote_key] => 
                        
                            [length] => 
                            [collation] => A
                            [null] => 
                        

                

        

    [primary_group] => 
        
            [alias] => primary_group
            [primary] => 
            [unique] => 
            [type] => BTREE
            [columns] => 
                
                    [primary_group] => 
                        
                            [length] => 
                            [collation] => A
                            [null] => 
                        

                

        


Field Aliases




Table Construction meta defined in schema



    [id] => 
        
            [dbtype] => INTEGER
            [phptype] => integer
            [null] => 
            [index] => pk
            [generated] => native
            [attributes] => unsigned
        

    [username] => 
        
            [dbtype] => varchar
            [precision] => 100
            [phptype] => string
            [null] => 
            [default] => 
            [index] => unique
        

    [password] => 
        
            [dbtype] => varchar
            [precision] => 100
            [phptype] => string
            [null] => 
            [default] => 
        

    [cachepwd] => 
        
            [dbtype] => varchar
            [precision] => 100
            [phptype] => string
            [null] => 
            [default] => 
        

    [class_key] => 
        
            [dbtype] => varchar
            [precision] => 100
            [phptype] => string
            [null] => 
            [default] => modUser
            [index] => index
        

    [active] => 
        
            [dbtype] => tinyint
            [precision] => 1
            [phptype] => boolean
            [attributes] => unsigned
            [null] => 
            [default] => 1
        

    [remote_key] => 
        
            [dbtype] => varchar
            [precision] => 191
            [phptype] => string
            [null] => 1
            [index] => index
        

    [remote_data] => 
        
            [dbtype] => text
            [phptype] => json
            [null] => 1
        

    [hash_class] => 
        
            [dbtype] => varchar
            [precision] => 100
            [phptype] => string
            [null] => 
            [default] => hashing.modPBKDF2
        

    [salt] => 
        
            [dbtype] => varchar
            [precision] => 100
            [phptype] => string
            [null] => 
            [default] => 
        

    [primary_group] => 
        
            [dbtype] => int
            [precision] => 10
            [phptype] => integer
            [attributes] => unsigned
            [null] => 
            [default] => 0
            [index] => index
        

    [session_stale] => 
        
            [dbtype] => text
            [phptype] => array
            [null] => 1
        

    [sudo] => 
        
            [dbtype] => tinyint
            [precision] => 1
            [phptype] => boolean
            [attributes] => unsigned
            [null] => 
            [default] => 0
        

    [createdon] => 
        
            [dbtype] => int
            [precision] => 20
            [phptype] => timestamp
            [null] => 
            [default] => 0
        


Aggregate Relations



    [CreatedResources] => 
        
            [class] => modResource
            [local] => id
            [foreign] => createdby
            [cardinality] => many
            [owner] => local
        

    [EditedResources] => 
        
            [class] => modResource
            [local] => id
            [foreign] => editedby
            [cardinality] => many
            [owner] => local
        

    [DeletedResources] => 
        
            [class] => modResource
            [local] => id
            [foreign] => deletedby
            [cardinality] => many
            [owner] => local
        

    [PublishedResources] => 
        
            [class] => modResource
            [local] => id
            [foreign] => publishedby
            [cardinality] => many
            [owner] => local
        

    [SentMessages] => 
        
            [class] => modUserMessage
            [local] => id
            [foreign] => sender
            [cardinality] => many
            [owner] => local
        

    [ReceivedMessages] => 
        
            [class] => modUserMessage
            [local] => id
            [foreign] => recipient
            [cardinality] => many
            [owner] => local
        

    [PrimaryGroup] => 
        
            [class] => modUserGroup
            [local] => primary_group
            [foreign] => id
            [cardinality] => one
            [owner] => foreign
        


Composite Relations



    [Acls] => 
        
            [class] => modAccess
            [local] => id
            [foreign] => principal
            [cardinality] => many
            [owner] => local
        

    [Profile] => 
        
            [class] => modUserProfile
            [local] => id
            [foreign] => internalKey
            [cardinality] => one
            [owner] => local
        

    [UserSettings] => 
        
            [class] => modUserSetting
            [local] => id
            [foreign] => user
            [cardinality] => many
            [owner] => local
        

    [UserGroupMembers] => 
        
            [class] => modUserGroupMember
            [local] => id
            [foreign] => member
            [cardinality] => many
            [owner] => local
        

    [ActiveUsers] => 
        
            [class] => modActiveUser
            [local] => id
            [foreign] => internalKey
            [cardinality] => many
            [owner] => local
        


Ancestors



    [0] => modUser
    [1] => modPrincipal
    [2] => xPDOSimpleObject
    [3] => xPDOObject

MODX:
Website development platform combining security, power, and innovation.