mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Remove return type for User Service
This commit is contained in:
parent
1780db52bd
commit
365c190cca
@ -36,7 +36,7 @@ class PasswordProtection
|
||||
'errors' => new stdClass,
|
||||
];
|
||||
|
||||
if($request->header('X-API-OAUTH-PASSWORD')){
|
||||
if( $request->header('X-API-OAUTH-PASSWORD') && strlen($request->header('X-API-OAUTH-PASSWORD')) >=1 ){
|
||||
|
||||
//user is attempting to reauth with OAuth - check the token value
|
||||
//todo expand this to include all OAuth providers
|
||||
|
@ -400,7 +400,7 @@ class User extends Authenticatable implements MustVerifyEmail
|
||||
//$this->notify(new ResetPasswordNotification($token));
|
||||
}
|
||||
|
||||
public function service() :User
|
||||
public function service()
|
||||
{
|
||||
return new UserService($this);
|
||||
}
|
||||
|
@ -60,6 +60,7 @@ class UserTransformer extends EntityTransformer
|
||||
'oauth_provider_id' => (string) $user->oauth_provider_id,
|
||||
'last_confirmed_email_address' => (string) $user->last_confirmed_email_address ?: '',
|
||||
'google_2fa_secret' => (bool) $user->google_2fa_secret,
|
||||
'has_password' => (bool) $user->has_password,
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddHasPasswordFieldToUserTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->boolean('has_password')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user