PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 6.2.14
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v6.2.14
6.2.14 6.2.13 6.2.12 6.2.10 6.2.11 6.2.9 6.2.8 6.2.7 6.2.6 6.2.5 6.2.4 6.2.3 6.2.2 3.6.22 3.6.31 3.6.40 3.6.41 3.6.42 3.6.50 3.6.51 3.6.60 3.6.61 3.6.62 3.6.64 3.6.65 All 196 releases
fluentform / app / Models / User.php

User.php in Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder 6.2.14, at app/Models/User.php

68 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentForm\App\Models;
4
5 class User extends Model
6 {
7 /**
8 * The table associated with the model.
9 *
10 * @var string
11 */
12 protected $table = 'users';
13
14 /**
15 * The accessors to append to the model's array form.
16 *
17 * @var array
18 */
19 protected $appends = ['id', 'name', 'email', 'permalink'];
20
21 /**
22 * The attributes that should be hidden for arrays.
23 *
24 * @var array
25 */
26 protected $hidden = ['ID', 'user_email', 'user_pass', 'display_name'];
27
28 /**
29 * Get the id of the user.
30 *
31 * @return bool
32 */
33 public function getIdAttribute()
34 {
35 return (int) $this->attributes['ID'];
36 }
37
38 /**
39 * Get the name of the user.
40 *
41 * @return string
42 */
43 public function getNameAttribute()
44 {
45 return $this->attributes['display_name'];
46 }
47
48 /**
49 * Get the email of the user.
50 *
51 * @return string
52 */
53 public function getEmailAttribute()
54 {
55 return $this->attributes['user_email'];
56 }
57
58 /**
59 * Get the permalink of the user.
60 *
61 * @return string
62 */
63 public function getPermalinkAttribute()
64 {
65 return get_edit_user_link($this->attributes['ID']);
66 }
67 }
68