protected function delete(User $user, Model $model)
    {
        if (
            $this->isUsingSoftDeletes($model) &&
            ! $model->trashed() &&
            $user->isDisabled()
        ) {
            // If deleting is enabled, the model supports soft deletes, the model
            // isn't already deleted, and the LDAP user is disabled, we'll
            // go ahead and delete the users model.
            $model->delete();

            if ($this->isLogging()) {
                $type = get_class($user->getSchema());

                logger()->info("Soft-deleted user {$user->getCommonName()}. Their {$type} user account is disabled.");
            }
        }
    }
protected function delete(User $user, Model $model)
    {
        if (
            $this->isUsingSoftDeletes($model) &&
            ! $model->trashed() &&
            $user->isDisabled()
        ) {
            // If deleting is enabled, the model supports soft deletes, the model
            // isn't already deleted, and the LDAP user is disabled, we'll
            // go ahead and delete the users model.
            $model->delete();

            if ($this->isLogging()) {
                $type = get_class($user->getSchema());

                logger()->info("Soft-deleted user {$user->getCommonName()}. Their {$type} user account is disabled.");
            }
        }
    }
protected function delete ( User $ user , Model $ model ) { if ( $ this -> isUsingSoftDeletes ( $ model ) && ! $ model -> trashed ( ) && $ user -> isDisabled ( ) ) { // If deleting is enabled, the model supports soft deletes, the model // isn't already deleted, and the LDAP user is disabled, we'll // go ahead and delete the users model. $ model -> delete ( ) ; if ( $ this -> isLogging ( ) ) { $ type = get_class ( $ user -> getSchema ( ) ) ; logger ( ) -> info ( "Soft-deleted user {$user->getCommonName()}. Their {$type} user account is disabled." ) ; } } }
Soft deletes the specified model if their LDAP account is disabled.

@param User  $user
@param Model $model

@return void

@throws Exception
Soft deletes the specified model if their LDAP account is disabled .