Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F34566486
Identity.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
859 B
Referenced Files
None
Subscribers
None
Identity.php
View Options
<?php
namespace
AuthGrove
;
use
Illuminate\Database\Eloquent\Model
;
class
Identity
extends
Model
{
use
FindableByAttribute
;
/**
* The database table used by the model.
*
* @var string
*/
protected
$table
=
'identities'
;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected
$fillable
=
[
'uuid'
,
'user_id'
,
'username'
,
'fullname'
];
/**
* The user linked to this identity
*
* @var User
*/
private
$user
;
/**
* Gets user linked to this identity
*/
public
function
getUser
()
{
if
(
$this
->
user
===
null
)
{
$this
->
user
=
User
::
find
(
$this
->
attributes
[
'user_id'
]);
}
return
$this
->
user
;
}
/**
* Gets identity name
*/
public
function
getName
()
{
if
(
$this
->
attributes
[
'fullname'
]
!==
""
)
{
return
$this
->
attributes
[
'fullname'
];
}
return
$this
->
attributes
[
'username'
];
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Jul 4, 03:04 (3 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3882060
Default Alt Text
Identity.php (859 B)
Attached To
Mode
rGROVE Auth Grove
Attached
Detach File
Event Timeline
Log In to Comment