*/
public function indexAction()
{
- $em = $this->getDoctrine()->getManager();
-
- $credentials = $em->getRepository('WallabagCoreBundle:SiteCredential')->findByUser($this->getUser());
+ $credentials = $this->get('wallabag_core.site_credential_repository')->findByUser($this->getUser());
return $this->render('WallabagCoreBundle:SiteCredential:index.html.twig', array(
'credentials' => $credentials,
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
+ $credential->setPassword($this->get('wallabag_core.helper.crypto_proxy')->crypt($credential->getPassword()));
+
$em = $this->getDoctrine()->getManager();
$em->persist($credential);
$em->flush($credential);