Remove unused code for master

pull/2881/head
Julio Montoya 6 years ago
parent c1073198e8
commit 579cacfdd5
  1. 45
      main/inc/lib/usermanager.lib.php
  2. 2
      src/CoreBundle/Framework/Container.php

@ -9,7 +9,6 @@ use Chamilo\CoreBundle\Repository\AccessUrlRepository;
use Chamilo\UserBundle\Entity\User;
use Chamilo\UserBundle\Repository\UserRepository;
use ChamiloSession as Session;
use Symfony\Component\Security\Core\Encoder\EncoderFactory;
/**
* Class UserManager.
@ -109,23 +108,6 @@ class UserManager
return $validPassword;
}
/**
* @param string $raw
* @param User $user
*
* @return string
*/
public static function encryptPassword($raw, User $user)
{
$encoder = self::getEncoder($user);
$encodedPassword = $encoder->encodePassword(
$raw,
$user->getSalt()
);
return $encodedPassword;
}
/**
* @param int $userId
* @param string $password
@ -6652,33 +6634,6 @@ SQL;
return $fullName;
}
/**
* @return EncoderFactory
*/
private static function getEncoderFactory()
{
$encryption = self::getPasswordEncryption();
$encoders = [
'Chamilo\\UserBundle\\Entity\\User' => new \Chamilo\UserBundle\Security\Encoder($encryption),
];
$encoderFactory = new EncoderFactory($encoders);
return $encoderFactory;
}
/**
* @param User $user
*
* @return \Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface
*/
private static function getEncoder(User $user)
{
$encoderFactory = self::getEncoderFactory();
return $encoderFactory->getEncoder($user);
}
/**
* Disables or enables a user.
*

@ -14,7 +14,7 @@ use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\Security\Core\Authorization\AuthorizationChecker;
use Symfony\Component\Security\Core\Role\RoleHierarchy;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
/**
* Class Container

Loading…
Cancel
Save