Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F13143693
AccountInfo.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
AccountInfo.php
View Options
<?php
namespace
AuthGrove\Console\Commands
;
use
Illuminate\Console\Command
;
use
AuthGrove\User
;
use
AuthGrove\Console\Services\AccountHelpers
as
AccountHelpers
;
class
AccountInfo
extends
Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected
$signature
=
'account:info {user}'
;
/**
* The console command description.
*
* @var string
*/
protected
$description
=
'Get information about an account.'
;
/**
* Create a new command instance.
*
* @return void
*/
public
function
__construct
()
{
parent
::
__construct
();
}
protected
function
printInformationAttribute
(
$attribute
,
$value
)
{
$line
=
\Keruald\mb_str_pad
(
AccountHelpers
::
localizeUserAttribute
(
$attribute
),
21
);
$line
.=
$value
;
$this
->
comment
(
$line
);
}
/**
* Execute the console command.
*
* @return mixed
*/
public
function
handle
()
{
$user
=
AccountHelpers
::
findUser
(
$this
->
argument
(
'user'
));
if
(
$user
===
null
)
{
$this
->
comment
(
"User not found."
);
return
;
}
foreach
(
$user
->
getInformation
()
as
$attribute
=>
$value
)
{
$this
->
printInformationAttribute
(
$attribute
,
$value
);
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Nov 21, 16:48 (1 d, 9 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3188620
Default Alt Text
AccountInfo.php (1 KB)
Attached To
Mode
rGROVE Auth Grove
Attached
Detach File
Event Timeline
Log In to Comment