sopinet / autologin-bundle
There is no license information available for the latest version (dev-master) of this package.
Symfony AutologinBundle
Package info
github.com/sopinet/autologin-bundle
Type:symfony-bundle
pkg:composer/sopinet/autologin-bundle
dev-master
2015-08-12 07:57 UTC
Requires
- php: >=5.4.3
- symfony/framework-bundle: ~2.4
This package is not auto-updated.
Last update: 2026-03-14 21:37:48 UTC
README
When you receive a notification, invitation, etc. by email with a URL to your site, you have to login everytime. With this module, you will login automatically when you click on URL, it's too easy. Come on!
Prerequisites
This module works with FOSUserBundle (see Documentation)
Installation
composer.json
$ php composer.phar require sopinet/autologin-bundle 'dev-master'
AppKernel.php
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Sopinet\AutologinBundle\SopinetAutologinBundle(), ); }
config.yml
# app/config/config.yml sopinet_autologin: domain: http://domain.com
routing.yml
# app/config/routing.yml sopinet_autologin: resource: "@SopinetAutologinBundle/Resources/config/routing.yml" prefix: /
How to use
Generate the URL
<?php $url = $this->container->get('urlhelper')->generateUrl($route, $user); $message = \Swift_Message::newInstance() ->setSubject(...) ->setFrom(...) ->setTo(...) ->setBody($this->container->get('templating')->render('your_template.html.twig', array('url' => $url)), 'text/html');