mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
[v1] Add check for 0 value (#3473)
* Add check for 0 value * David said, this one is better
This commit is contained in:
parent
8bb70c7e9a
commit
9d5c3bd951
@ -15,7 +15,7 @@ class EligibleForMigration
|
|||||||
*/
|
*/
|
||||||
public function handle($request, Closure $next)
|
public function handle($request, Closure $next)
|
||||||
{
|
{
|
||||||
if (is_null(auth()->user()->public_id)) {
|
if (auth()->user()->eligibleForMigration()) {
|
||||||
return $next($request);
|
return $next($request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -496,7 +496,7 @@ class User extends Authenticatable
|
|||||||
|
|
||||||
public function eligibleForMigration()
|
public function eligibleForMigration()
|
||||||
{
|
{
|
||||||
return is_null($this->public_id);
|
return is_null($this->public_id) || $this->public_id == 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user