Sentinel\Models\User::getStatusAttribute PHP Method

getStatusAttribute() public method

Use an accessor method to get the user's status from the throttle table
public getStatusAttribute ( ) : [type]
return [type]
    public function getStatusAttribute()
    {
        $status = "Not Active";
        if ($this->isActivated()) {
            $status = "Active";
        }
        //Check for suspension
        if ($this->throttle && $this->throttle->isSuspended()) {
            $status = "Suspended";
        }
        //Check for ban
        if ($this->throttle && $this->throttle->isBanned()) {
            $status = "Banned";
        }
        return $status;
    }