1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 12:12:48 +01:00

[v1] Add check for 0 value (#3473)

* Add check for 0 value

* David said, this one is better
This commit is contained in:
Benjamin Beganović 2020-03-11 00:06:57 +01:00 committed by GitHub
parent 8bb70c7e9a
commit 9d5c3bd951
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ class EligibleForMigration
*/
public function handle($request, Closure $next)
{
if (is_null(auth()->user()->public_id)) {
if (auth()->user()->eligibleForMigration()) {
return $next($request);
}

View File

@ -496,7 +496,7 @@ class User extends Authenticatable
public function eligibleForMigration()
{
return is_null($this->public_id);
return is_null($this->public_id) || $this->public_id == 0;
}
}