You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After installation of the redirect plugin I am facing a
BadMethodCallException
Call to undefined method App\Models\User::isSuper()
issue.
The User Class is
<?php
namespace App\Models;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class User extends Authenticatable
{
use HasFactory, Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name',
'email',
'password',
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'password',
'remember_token',
];
/**
* The attributes that should be cast to native types.
*
* @var array
*/
protected $casts = [
'email_verified_at' => 'datetime',
];
}
as per description. Can you please help?
The text was updated successfully, but these errors were encountered:
I'll look into fixing it this week, as a note to myself I probably need to use \Statamic\Facades\User::fromUser($user)->isSuper() instead of just auth()->user()
You can temporarily fix this in your application by adding a isSuper() method to your user model that looks like this:
Hi,
I have just tried to install your redirect plugin in a site where I had to move users to a separate sqlite, following https://statamic.dev/tips/storing-users-in-a-database
After installation of the redirect plugin I am facing a
BadMethodCallException
Call to undefined method App\Models\User::isSuper()
issue.
The User Class is
as per description. Can you please help?
The text was updated successfully, but these errors were encountered: