mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-09 20:52:56 +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:
parent
8bb70c7e9a
commit
9d5c3bd951
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user