# User Model
DB Table Name | {wp_db_prefix}_users |
---|---|
Schema | Check Schema |
Source File | fluent-boards/app/Models/User.php |
Name Space | FluentBoards\App\Models |
Class | FluentBoards\App\Models\User |
# Attributes
Attribute | Data Type | Comment |
---|---|---|
ID | Integer | |
user_login | String | |
user_pass | String | |
user_nicename | String | |
user_email | String | |
user_url | String | |
user_registered | Date Time | |
user_activation_key | String | |
user_status | Integer | |
display_name | String |
# Usage
Please check Model Basic for Common methods.
# Accessing Attributes
$user = FluentBoards\App\Models\User::find(1);
$user->ID; // returns user ID
$user->user_email; // returns email
.......
1
2
3
4
5
6
2
3
4
5
6
# Relations
This model has the following relationships that you can use
# tasks
Access tasks associated with the user.
- return
FluentUsers\App\Models\Task
Model Collection
# Example:
$userTasks = $user->tasks;
1
# watchingTasks
Access tasks that the user is watching.
- return
FluentUsers\App\Models\Task
Model Collections
# Example:
$watchingTasks = $user->watchingTasks;
1
# highPriorityTasks
Access all the associated users of a User model
- return
FluentUsers\App\Models\Task
Model Collections
# Example:
$highPriorityTasks = $user->highPriorityTasks;
1
# overDueTasks
Access overdue tasks associated with the user.
- return
FluentUsers\App\Models\Task
Model Collections
# Example:
$overDueTasks = $user->overDueTasks;
1
# upcomingTasks
Access upcoming tasks associated with the user.
- return
FluentUsers\App\Models\Task
Model Collections
# Example:
$upcomingTasks = $user->upcomingTasks;
1
# upcomingWithoutDuedate
Access upcoming tasks without a due date.
- return
FluentUsers\App\Models\Task
Model Collections
# Example:
$upcomingTasksNoDueDate = $user->upcomingWithoutDuedate;
1
# boards
Access boards associated with the user.
- return
FluentUsers\App\Models\Board
Model Collections
# Example:
$userBoards = $user->boards;
1
# whichBoards
Access boards where the user has a specific relationship.
- return
FluentUsers\App\Models\Board
Model Collections
# Example:
$userWhichBoards = $user->whichBoards;
1
# notifications
Access notifications associated with the user.
- return
FluentUsers\App\Models\Notification
Model Collections
# Example:
$userNotifications = $user->notifications;
1