Core Principles
No User Data Storage: social.plus SDK does not store or manage any personal user data. This means no user profiles, emails, or personal information is stored in social.plus systems.
Key Benefits
Privacy First
Your users’ data stays in your systems, ensuring privacy and compliance
No Migration
Integrate social.plus without importing or migrating existing user profiles
Full Control
Handle user management with your existing application logic and systems
User Identification
Every user in social.plus is represented by a uniqueuserId
- a string that uniquely identifies the user and remains immutable throughout their lifetime.
Choosing the Right User ID
Database Primary KeysBenefits:
- Immutable throughout user’s lifetime
- Unique by design
- Already exists in your system
- Consistent across your application
- Auto-incrementing integers
- UUIDs
- Custom-generated unique identifiers
Important: Once a user is created in social.plus, their
userId
cannot be changed. Choose your user identification strategy carefully.User Data Structure
While social.plus doesn’t store personal data, it maintains essential information for social features:User Attributes
Attribute | Data Type | Description |
---|---|---|
userId | string | The unique identifier of this user |
displayName | string | The display name shown to other users |
roles | Array<string> | A list of roles assigned to this user |
metadata | Object | Custom metadata for this user |
avatarCustomUrl | string | Custom URL for user avatar |
flagCount | integer | Number of users that have flagged this user |
hashFlag | Object | Internal hash for checking if user was flagged |
isGlobalBan | boolean | Indicates if user is globally banned |
isDeleted | boolean | Indicates if user is deleted |
createdAt | date | When the user was created in social.plus |
updatedAt | date | When the user was last updated |
User Roles & Permissions
Enhance user capabilities by assigning roles with specific permissions defined in your admin panel.Role-Based Access Control: social.plus uses a comprehensive permission system that allows you to create hierarchical moderation structures and fine-grained access control.
Quick Overview
Default Roles
Built-in Role Hierarchy
Member → Channel Moderator → Community Moderator → Super Moderator → Global Admin
Member → Channel Moderator → Community Moderator → Super Moderator → Global Admin
Custom Roles
Flexible Permissions
Create custom roles with specific permissions in the social.plus Console
Create custom roles with specific permissions in the social.plus Console
User Repository
While social.plus doesn’t store user profiles, it provides tools for querying and searching users within your social features.Initializing User Repository
Best Practices
User ID Strategy
Do:
- Use database primary keys
- Ensure immutability
- Keep IDs consistent across your app
- Use changeable identifiers
- Include personal information
- Create complex ID schemes
Data Management
Do:
- Keep user profiles in your system
- Sync display names as needed
- Use metadata for social.plus specific data
- Store personal data in social.plus
- Rely on social.plus for user management
- Ignore privacy compliance
Role Management
Do:
- Define clear role hierarchies
- Use roles for feature access
- Plan for role changes
- Hardcode role permissions
- Create too many role levels
- Forget to update roles
Performance
Do:
- Cache user repository queries
- Implement pagination
- Use efficient search patterns
- Make unnecessary API calls
- Load all users at once
- Ignore query optimization