ヤミRoot VoidGate
User / IP
:
216.73.216.81
Host / Server
:
146.88.233.70 / dev.loger.cm
System
:
Linux hybrid1120.fr.ns.planethoster.net 3.10.0-957.21.2.el7.x86_64 #1 SMP Wed Jun 5 14:26:44 UTC 2019 x86_64
Command
|
Upload
|
Create
Mass Deface
|
Jumping
|
Symlink
|
Reverse Shell
Ping
|
Port Scan
|
DNS Lookup
|
Whois
|
Header
|
cURL
:
/
home
/
logercm
/
dev.loger.cm
/
src
/
Repository
/
Viewing: UserRepository.php
<?php namespace App\Repository; use App\Entity\User; use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; use Doctrine\DBAL\Driver\PDO\Exception; use Doctrine\Persistence\ManagerRegistry; use Symfony\Component\Security\Core\Exception\UnsupportedUserException; use Symfony\Component\Security\Core\User\PasswordUpgraderInterface; use Symfony\Component\Security\Core\User\UserInterface; /** * @method User|null find($id, $lockMode = null, $lockVersion = null) * @method User|null findOneBy(array $criteria, array $orderBy = null) * @method User[] findAll() * @method User[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) */ class UserRepository extends ServiceEntityRepository implements PasswordUpgraderInterface { public function __construct(ManagerRegistry $registry) { parent::__construct($registry, User::class); } /** * Used to upgrade (rehash) the user's password automatically over time. */ public function upgradePassword(UserInterface $user, string $newEncodedPassword): void { if (!$user instanceof User) { throw new UnsupportedUserException(sprintf('Instances of "%s" are not supported.', \get_class($user))); } $user->setPassword($newEncodedPassword); $this->_em->persist($user); $this->_em->flush(); } // /** // * @return User[] Returns an array of User objects // */ /* public function findByExampleField($value) { return $this->createQueryBuilder('u') ->andWhere('u.exampleField = :val') ->setParameter('val', $value) ->orderBy('u.id', 'ASC') ->setMaxResults(10) ->getQuery() ->getResult() ; } */ public function findOneBySomeField($value): ?User { return $this->createQueryBuilder('u') ->andWhere('u.email = :val') ->setParameter('val', $value) ->getQuery() ->getOneOrNullResult() ; } public function getAllUser() { return $this->createQueryBuilder('u') ->orderBy('u.id', 'DESC') ->setMaxResults(10) ->getQuery() ->getResult() ; } public function activateUser($email) { $response = false; try { $qb = $this->_em->getRepository($this->_entityName)->createQueryBuilder('fe'); $qb->update(User::class) ->set('fe.enable', "enable") ->set('fe.active', "active") ->where('fe.email', 'email') ->setParameter('active', true) ->setParameter('enable', true) ->setParameter('email', $email) ->getQuery(); $this->_em->persist($qb); $this->_em->flush(); $response = true; } catch (Exception $e) { return 'An Error occured during save: ' .$e->getMessage(); } return $response; } }
Coded With 💗 by
0x6ick