Skip to content

Commit 5aacb46

Browse files
committed
Preserve WP fields in User model
1 parent 05e06f5 commit 5aacb46

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Models/WpUser.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,13 @@ protected static function boot()
8686

8787
static::addGlobalScope('addAttributes', function (Builder $builder) {
8888
$builder->addSelect([
89+
'ID',
8990
'ID as id',
91+
'user_login',
9092
'user_login as name',
93+
'user_email',
9194
'user_email as email',
95+
'user_pass',
9296
'user_pass as password',
9397
]);
9498
});

0 commit comments

Comments
 (0)