This attribute specified user is admin or not for logined user
@return bool
182011
public function getIsAdminAttribute()
	{
		$project = Project::getProjectByUrl(Route::Input('project'));
		if ($project)
		{
			$admins = explode(',', $project->admins);
			if (in_array(Auth::id(), $admins))
			{
				return $this->attributes['is_admin'] = true;
			}
			return $this->attributes['is_admin'] = false;
		}
	}
1261745
public function isUserAllowedAccess()
    {
        $requestedRoles = $this->getRequestedRoles();

        // we allow access if there are no requested roles that the user must have
        if (count($requestedRoles) < 1) {
            return true;
        }

        return $this->getAccessDecision($requestedRoles);
    }
1356513
protected function validateRoleUser()
    {
        $field = 'role_id';
        $value = $this->getSubmitted($field);

        if (empty($value)) {
            return null;
        }

        $label = $this->translation->text('Role');

        if (!is_numeric($value)) {
            $this->setErrorNumeric($field, $label);
            return false;
        }

        $role = $this->role->get($value);

        if (empty($role)) {
            $this->setErrorUnavailable($field, $label);
            return false;
        }

        return true;
    }
920147
public function isEnabled()
    {
        return ($c = $this->enabledAttribute) !== null
            ? (boolean) $this->owner->$c
            : (($c = $this->disabledAttribute) !== null ? (boolean) !$this->owner->$c : null);
    }
1099824
protected function hasRole()
    {
        $request = $this->request;
        $role = $this->getAction('is');

        return ! $this->forbiddenRoute() && $request->user()->hasRole($role);
    }
1368387
public function canManage()
    {
        $component = $this->getIdentifier()->package;

        return $this->getObject('user')->authorise('core.manage', 'com_'.$component) === true;
    }
875461
public function UserEnabledCheck()
    {
        $user = Auth::user()->where('email', '=', Auth::user()->email )->get()->first();

        if ( $user ) {
            return $user->enabled;
        } else {
            return false;
        }
    }
518582
public function isAuthorised()
    {

        if (is_array($this->user) === true
            && isset($this->user['error']) === false
        ) {

            return true;
        }

        return $this->getUser();
    }
92541
public function isLoggedIn()
    {
        $isSimulatedLoggedIn = ($this->loggedInUser !== null);
        $isReallyLoggedIn = $this->getFrontEndController() !== null && $this->getFrontEndController()->loginUser;

        return $isSimulatedLoggedIn || $isReallyLoggedIn;
    }
416417
public function isAuthorized()
    {
        /** @var Rbac $rbac */
        $rbac = $this->getContainer()->get('rbac');

        /** @var Auth $auth */
        $auth = $this->getContainer()->get('auth');
        foreach ($auth->getStorage()->read()['roles'] as $roleName) {
            if (true === $rbac->isGranted($roleName, 'admin.panel.view')) {
                return true;
            }
        }

        return false;
    }
701350
def is_admin(self, user):
        
        return True if self.organization_users.filter(
            user=user, is_admin=True
        ) else False
1142985
public function wasByCurrentUser()
    {
        return $this->credentials->check() && $this->credentials->getUser()->id == $this->wrappedObject->user_id;
    }
671001
public function isGranted(UserInterface $user, $attributes, OwnedByUserModelInterface $model = null): bool
    {
        if (null !== $model && $user->getId() !== $model->getOwnedByUserId()) {
            $this->logger->info(
                'security.authorization.role: user and model owner are not the same {userId}, {ownerByUserId}',
                ['userId' => $user->getId(), 'ownerByUserId' => $model->getOwnedByUserId()]
            );

            return false;
        }

        $owningRoles = $this->getOwningRoles($user);
        $neededRoles = $this->getNeededRoles($attributes);

        $granted = $this->checkRoles($owningRoles, $neededRoles);

        $this->logger->info(
            'security.authorization.role: user {userId} granted {granted} for needed roles {neededRoles}',
            ['userId' => $user->getId(), 'granted' => $granted, 'neededRoles' => implode(', ', $neededRoles)]
        );

        return $granted;
    }
928659
public function isAccountingSetup()
  {
    $Setting = $this->Setting->byOrganization($this->AuthenticationManager->getCurrentUserOrganization('id'))->first();

    if(empty($Setting->is_configured))
    {
      return false;
    }
    else
    {
      return true;
    }
  }
1172874
public function __isAllowed()
    {
        if ($this->checkAuthentication !== true) {
            // this controller is not responsible for the authentication
            return false;
        }

        $this->typo3Loader->initializeFrontEndUser($this->determinePageIdFromArguments());

        $feUser = $this->typo3Loader->getFrontEndUser();
        if ($feUser->user === null) {
            return false;
        }
        return true;
    }
124264
public function isValid(): bool {
		return ($this->loginContext->hasCurrentUser()
				&& $this->loginContext->getCurrentUser()->isAdmin()) || N2N::isDevelopmentModeOn();
	}
865262
public function isLoggedIn()
    {
        $roleModel = new \erdiko\users\models\Role;
        $roleGeneral = $roleModel->findByName('user');

		// @todo update exception message for clarity
        if (empty($roleGeneral)){
            throw  new \Exception('Error, role user not found.');
        }

		return ( ( $this->_user->getId() > 0 ) && ( $this->_user->getRole() !== $roleGeneral->getId() ) );
	}