Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12240190
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/app/User.php b/app/User.php
index 7dc225e..6105036 100644
--- a/app/User.php
+++ b/app/User.php
@@ -1,70 +1,71 @@
<?php namespace AuthGrove;
use Illuminate\Auth\Authenticatable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Auth\Passwords\CanResetPassword;
use AuthGrove\Services\FindableByAttribute;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
class User extends Model implements AuthenticatableContract, CanResetPasswordContract {
use Authenticatable, CanResetPassword, FindableByAttribute;
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'users';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = ['username', 'fullname', 'email', 'password'];
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
protected $hidden = ['password', 'remember_token'];
/**
* Gets fillable but not hidden attributes, plus create/update time
*
* @return Array
*/
public function getAttributes () {
$attributes = array_diff($this->fillable , $this->hidden);
$attributes[] = 'created_at';
$attributes[] = 'updated_at';
+ array_unshift($attributes, 'id');
return $attributes;
}
/**
* Gets non sensible properties
*
* @return Array
*/
public function getInformation () {
$info = [];
$attributes = $this->getAttributes();
foreach ($attributes as $attribute) {
$info[$attribute] = $this->attributes[$attribute];
}
return $info;
}
/**
* Gets the full name of an user, or if not defined, the username.
*/
public function getName () {
if ($this->attributes['fullname'] !== "") {
return $this->attributes['fullname'];
}
return $this->attributes['username'];
}
}
diff --git a/resources/lang/en/panel.php b/resources/lang/en/panel.php
index 0ec6ebb..bf73071 100644
--- a/resources/lang/en/panel.php
+++ b/resources/lang/en/panel.php
@@ -1,42 +1,43 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| E-mail content
|--------------------------------------------------------------------------
|
| The following language lines are used in mails sent by Auth Grove.
|
*/
///
/// Navigation
///
'home' => 'Home',
'logout' => 'Logout',
'toggle-navigation' => 'Toggle Navigation',
///
/// Home - Status
///
'status' => 'Status',
'loggedin' => "You're logged in.",
///
/// Home - Account
///
'account' => 'Account information',
'user-attributes' => [
+ "id" => "User ID",
"username" => "Username",
"fullname" => "Full name",
"email" => "E-mail",
"created_at" => "Account created",
"updated_at" => "Last updated",
],
];
\ No newline at end of file
diff --git a/resources/views/home.blade.php b/resources/views/home.blade.php
index 178e429..03b1cea 100644
--- a/resources/views/home.blade.php
+++ b/resources/views/home.blade.php
@@ -1,38 +1,39 @@
@extends('app')
@section('content')
<div class="container">
<div class="row">
<div class="col-md-10 col-md-offset-1">
<div class="panel panel-default">
<div class="panel-heading">@lang('panel.status')</div>
<div class="panel-body">
@lang('panel.loggedin')
+
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-10 col-md-offset-1">
<div class="panel panel-default">
<div class="panel-heading">@lang('panel.account')</div>
<div class="panel-body">
<table class="table table-striped">
<tbody>
@foreach ($user as $key => $attribute)
<tr>
<th>@lang("panel.user-attributes.$key")</th>
- <td>{{ $attribute }}</td>
+ <td id="user-info-{{ $key }}">{{ $attribute }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
@endsection
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Oct 12, 03:25 (1 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3064361
Default Alt Text
(3 KB)
Attached To
Mode
rGROVE Auth Grove
Attached
Detach File
Event Timeline
Log In to Comment