Метод |
Описание |
|
__construct ( ) |
Class constructor. Defines the related database table name. |
|
addInsertFields ( &$Fields ) |
Parent override. |
|
addPasswordStrength ( Gdn_Controller $Controller ) |
Set password strength meter on a form. |
|
approve ( integer $UserID, string $Email ) : boolean |
Approve a membership applicant. |
|
attributes ( array | object $user ) : array |
Reliably get the attributes from any user array or object. |
|
ban ( integer $UserID, array $Options ) |
Manually ban a user. |
|
checkPermission ( mixed $User, mixed $Permission, array $Options = [] ) : boolean |
Checks the specified user's for the given permission. Returns a boolean value indicating if the action is permitted. |
|
clearCache ( integer | null $UserID, $CacheTypesToClear = null ) : boolean |
Delete cached data for user. |
|
clearNavigationPreferences ( string $userID = '' ) |
Clears navigation preferences for a user. |
|
clearPermissions ( ) |
Clear the permission cache. |
|
clearSectionNavigationPreference ( string $url = '', string $userID = '', boolean $resetSectionPreference = true ) |
Checks if a url is saved as a navigation preference and if so, deletes it. |
|
compilePermissions ( array $rawPermissions ) : array |
Take raw permission definitions and create. |
|
confirmEmail ( array | object $User, string $EmailKey ) : boolean |
Users respond to confirmation emails by clicking a link that takes them here. |
|
connect ( string $UniqueID, string $ProviderKey, array $UserData, array $Options = [] ) : integer |
Connect a user with a foreign authentication system. |
|
countEstimate ( ) : integer |
Approximate the number of users by checking the database table status. |
|
counts ( string $Column, integer | null $UserID = null ) |
User counts. |
|
decline ( integer $UserID ) : boolean |
Decline a user's application to join the forum. |
|
definePermissions ( integer $UserID, boolean $Serialize = false ) : array |
Load and compile user permissions |
|
delete ( $where = [], $options = [] ) |
Delete a user. |
|
deleteContent ( integer $UserID, array $Options = [], array $Content = [] ) : boolean | integer |
Delete a user's content across many contexts. |
|
deleteID ( integer $userID, array $options = [] ) |
Delete a single user. |
|
filterForm ( array $data, boolean $register = false ) : array |
Filter dangerous fields out of user-submitted data. |
|
fixGender ( string $Value ) : string |
Force gender to be a verified value. |
|
get ( $OrderFields = '', $OrderDirection = 'asc', $Limit = false, $Offset = false ) : object |
Default Gdn_Model::get() behavior. |
|
getActiveUsers ( integer $Limit = 5 ) : Gdn_DataSet |
Get the most recently active users. |
|
getApplicantCount ( ) : integer |
Get the current number of applicants waiting to be approved. |
|
getApplicants ( ) : Gdn_DataSet |
Returns all users in the applicant role. |
|
getAttribute ( integer $UserID, string $Attribute, mixed $DefaultValue = false ) : mixed |
Get an Attribute from a single user. |
|
getAuthentication ( string $UniqueID, string $Provider ) : array | false |
Get the a user authentication row. |
|
getByEmail ( string $Email ) : array | boolean | stdClass |
Get user by email address. |
|
getByRole ( integer | string $Role ) : Gdn_DataSet |
Get users by role. |
|
getByUsername ( string $Username ) : boolean | object |
Get a user by their username. |
|
getCountLike ( array | boolean $Like = false ) : integer |
|
|
getCountWhere ( array | false $Where = false ) : integer |
|
|
getDefaultAvatarUrl ( array $user = [], string $size = 'thumbnail' ) : string |
Returns the url to the default avatar for a user. |
|
getDelete ( string $Table, array $Where, array &$Data ) |
Get rows from a table then delete them. |
|
getID ( integer $ID, string | false $DatasetType = false, array $Options = [] ) : array | object | false |
Get a user by ID. |
|
getIDs ( array $IDs, boolean $SkipCacheQuery = false ) : array |
|
|
getIPs ( integer $userID ) : array |
Retrieve IP addresses associated with a user. |
|
getInvitationCount ( integer $UserID ) : integer |
Get number of available invites a user has. |
|
getLike ( boolean $Like = false, string $OrderFields = '', string $OrderDirection = 'asc', boolean $Limit = false, boolean $Offset = false ) : Gdn_DataSet |
|
|
getMeta ( integer $UserID, string $Key, string $Prefix = '', string $Default = '' ) : array |
Retries UserMeta information for a UserID / Key pair. |
|
getPermissions ( integer $userID ) : Vanilla\Permissions |
Get a user's permissions. |
|
getPermissionsIncrement ( ) : boolean | integer | mixed |
|
|
getRoles ( integer $userID ) : Gdn_DataSet |
Get the roles for a user. |
|
getSession ( integer $UserID, boolean $Refresh = false ) : array | object | false |
|
|
getSummary ( string $OrderFields = '', string $OrderDirection = 'asc', boolean $Limit = false, boolean $Offset = false ) : array | null |
Retrieve a summary of "safe" user information for external API calls. |
|
getSystemUserID ( ) : integer |
Retrieves a "system user" id that can be used to perform non-real-person tasks. |
|
getUserFromCache ( string | integer $UserToken, string $TokenType ) : array | false |
Get a user from the cache by name or ID |
|
givePoints ( integer $UserID, integer $Points, string $Source = 'Other', integer | false $Timestamp = false ) |
Add points to a user's total. |
|
increaseInviteCount ( integer $UserID, integer $IncreaseBy = 1 ) |
Increases the user's CountInvitations value by the specified amount. |
|
insertForApproval ( array $FormPostValues, array $Options = [] ) : integer |
To be used for approval registration. |
|
insertForBasic ( array $FormPostValues, boolean $CheckCaptcha = true, array $Options = [] ) : boolean | integer | string |
To be used for basic registration, and captcha registration. |
|
insertForInvite ( array $FormPostValues, array $Options = [] ) : integer |
To be used for invitation registration. |
|
joinUsers ( array | Gdn_DataSet &$Data, array $Columns, array $Options = [] ) |
Add user data to a result set. |
|
merge ( integer $OldUserID, integer $NewUserID ) |
Merge the old user into the new user. |
|
newUserRoleIDs ( ) : array |
|
|
noEmail ( ) : boolean |
Whether or not users have email addresses. |
|
passwordRequest ( string $Email ) : boolean |
Send forgot password email. |
|
passwordReset ( integer $UserID, string $Password ) : array | false |
Do a password reset. |
|
pastUserMegaThreshold ( ) : boolean |
Whether we're wandered into extreme database optimization territory with our user count. |
|
pastUserThreshold ( ) : boolean |
Whether or not we are past the user threshold. |
|
profileCount ( integer | string | object $User, string $Column ) : integer | false |
Get a user's counter. |
|
rateLimit ( array $User, boolean $PasswordOK ) |
Check and apply login rate limiting |
|
reduceInviteCount ( integer $UserID, integer $ReduceBy = 1 ) |
Reduces the user's CountInvitations value by the specified amount. |
|
register ( array $FormPostValues, array $Options = [] ) : boolean | integer | string |
Register a new user. |
|
removePicture ( integer $UserID ) |
Remove the photo from a user. |
|
requireConfirmEmail ( ) : boolean |
Whether or not the application requires email confirmation. |
|
save ( array $FormPostValues, array $Settings = [] ) |
Generic save procedure. |
|
saveAbout ( integer $UserID, string $About ) |
Saves the user's About field. |
|
saveAdminUser ( array $FormPostValues ) |
Create an admin user account. |
|
saveAttribute ( integer $UserID, mixed $Attribute, mixed $Value = '' ) |
Saves a user attribute to the database. |
|
saveAuthentication ( array $Data ) : Gdn_DataSet | string |
|
|
saveIP ( integer $userID, string $IP, string $dateUpdated = false ) : boolean |
Record an IP address for a user. |
|
savePreference ( integer $UserID, mixed $Preference, mixed $Value = '' ) |
Saves a user preference to the database. |
|
saveRoles ( integer $UserID, array $RoleIDs, boolean $RecordEvent ) |
|
|
saveToSerializedColumn ( string $Column, integer $UserID, mixed $Name, mixed $Value = '' ) |
Saves a name/value to the user's specified $Column. |
|
search ( array | string $Filter, string $OrderFields = '', string $OrderDirection = 'asc', boolean $Limit = false, boolean $Offset = false ) : Gdn_DataSet |
Search users. |
|
searchCount ( array | string $Filter = '' ) : integer |
Count search results. |
|
sendEmailConfirmationEmail ( integer | string | null $User = null, boolean $Force = false ) |
Send the confirmation email. |
|
sendPasswordEmail ( integer $UserID, string $Password ) |
Send password email. |
|
sendWelcomeEmail ( integer $UserID, string $Password, string $RegisterType = 'Add', array | null $AdditionalData = null ) |
Send welcome email to user. |
|
setCalculatedFields ( &$User ) |
Set fields that need additional manipulation after retrieval. |
|
setField ( integer $RowID, array | string $Property, boolean $Value = false ) : boolean |
Set a single user property. |
|
setMeta ( integer $UserID, array $Meta, string $Prefix = '' ) |
|
|
setTransientKey ( integer $UserID, string $ExplicitKey = '' ) : string |
Set the TransientKey attribute on a user. |
|
signinLabelCode ( ) : string |
|
|
sso ( string $String, boolean $ThrowError = false ) : integer | void |
Initiate an SSO connection. |
|
syncUser ( array | integer $CurrentUser, array $NewUser, boolean $Force = false ) |
Sync user data. |
|
synchUser ( array | integer $CurrentUser, array $NewUser, boolean $Force = false ) |
Sync user data. |
|
synchronize ( string $UserKey, array $Data ) : integer |
Synchronizes the user based on a given UserKey. |
|
tagSearch ( string $Search, integer $Limit = 10 ) |
A simple search for tag queries. |
|
unBan ( integer $UserID, array $Options = [] ) |
Unban a user. |
|
updateUserCache ( integer $UserID, string | array $Field, mixed | null $Value = null ) |
|
|
updateVisit ( integer $UserID, string | integer | float $ClientHour = false ) |
Updates visit level information such as date last active and the user's ip address. |
|
userCache ( array $User, $UserID = null ) : boolean |
Cache a user. |
|
userCacheRoles ( integer $userID, array $roleIDs ) : boolean |
Cache a user's roles. |
|
userQuery ( boolean $SafeData = false ) |
Query the user table. |
|
validate ( array $FormPostValues, boolean $Insert = false ) : boolean | array |
Validate submitted user data. |
|
validateCredentials ( string $Email = '', $ID, string $Password ) : object | false |
Validate User Credential. |
|
validateSpamRegistration ( array $User ) : boolean | string |
|
|
validateUniqueFields ( string $Username, string $Email, string $UserID = '', boolean $Return = false ) : array | boolean |
Checks to see if $Username and $Email are already in use by another member. |
|