mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-11 13:42:49 +01:00
b233aa0744
Conflicts: .travis.yml CONTRIBUTING.md README.md app/Http/Controllers/AccountController.php app/Http/Controllers/AppController.php app/Http/Controllers/BaseAPIController.php app/Http/Controllers/CreditController.php app/Http/Controllers/DashboardController.php app/Http/Controllers/DocumentController.php app/Http/Controllers/PaymentController.php app/Http/Controllers/QuoteApiController.php app/Http/Requests/EntityRequest.php app/Http/routes.php app/Listeners/AnalyticsListener.php app/Models/Account.php app/Models/Credit.php app/Models/Document.php app/Models/EntityModel.php app/Models/Expense.php app/Models/Invoice.php app/Models/Task.php app/Models/VendorContact.php app/Ninja/Notifications/PushFactory.php app/Ninja/Repositories/DocumentRepository.php app/Ninja/Repositories/ExpenseRepository.php app/Ninja/Repositories/InvoiceRepository.php app/Services/PushService.php composer.json composer.lock database/migrations/2014_05_17_175626_add_quotes.php database/seeds/UserTableSeeder.php resources/lang/en/texts.php resources/views/accounts/customize_design.blade.php resources/views/accounts/invoice_design.blade.php resources/views/accounts/management.blade.php resources/views/expenses/edit.blade.php resources/views/header.blade.php resources/views/invoices/edit.blade.php resources/views/master.blade.php resources/views/payments/payment.blade.php resources/views/users/edit.blade.php
33 lines
1.2 KiB
PHP
33 lines
1.2 KiB
PHP
<?php namespace App\Ninja\Transformers;
|
|
|
|
use App\Models\Account;
|
|
use App\Models\User;
|
|
|
|
class UserTransformer extends EntityTransformer
|
|
{
|
|
public function transform(User $user)
|
|
{
|
|
return [
|
|
'id' => (int) ($user->public_id + 1),
|
|
'first_name' => $user->first_name,
|
|
'last_name' => $user->last_name,
|
|
'email' => $user->email,
|
|
'account_key' => $user->account->account_key,
|
|
'updated_at' => $this->getTimestamp($user->updated_at),
|
|
'deleted_at' => $this->getTimestamp($user->deleted_at),
|
|
'phone' => $user->phone,
|
|
//'username' => $user->username,
|
|
'registered' => (bool) $user->registered,
|
|
'confirmed' => (bool) $user->confirmed,
|
|
'oauth_user_id' => $user->oauth_user_id,
|
|
'oauth_provider_id' => $user->oauth_provider_id,
|
|
'notify_sent' => (bool) $user->notify_sent,
|
|
'notify_viewed' => (bool) $user->notify_viewed,
|
|
'notify_paid' => (bool) $user->notify_paid,
|
|
'notify_approved' => (bool) $user->notify_approved,
|
|
'is_admin' => (bool) $user->is_admin,
|
|
'permissions' => (int) $user->getOriginal('permissions'),
|
|
];
|
|
}
|
|
}
|