Skip to content

Switched the documentation from Markdown to ReStructuredText #1717

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
401 commits
Select commit Hold shift + click to select a range
ab580c1
Merge pull request #1136 from dbu/move-listeners
stof Jun 10, 2013
891a41b
updated swiftmailer/swiftmailer version specification
shieldo Jun 15, 2013
c406ce0
Merge pull request #1164 from shieldo/patch-1
stof Jun 15, 2013
1111186
Merge pull request #1146 from felds/patch-1
stof Jun 16, 2013
2551017
Update FOSUserBundle.sk.yml
Kuro-dake Jun 18, 2013
fb18ac4
Merge pull request #1167 from Kuro-dake/patch-1
stof Jun 19, 2013
d7a36ed
Add badge-poser
agiuliano Jun 19, 2013
6cf71d1
Merge pull request #1169 from agiuliano/master
stof Jun 19, 2013
a72cb51
fix romanian translations
xaben Jun 19, 2013
5214fbd
Merge pull request #1170 from xaben/patch-romanian
stof Jun 19, 2013
16713f3
fix typo in ukrainian translation
Jun 24, 2013
a3c5cc2
Merge pull request #1173 from vtuz/master
stof Jun 24, 2013
b92850f
just little change to mongo schema, this don't permit use sonata user…
Jun 25, 2013
b588ede
just little change to mongo schema, this don't permit use sonata user…
Jun 25, 2013
12d7a76
mapping fields credendialsExpired and credentialExpiredAt camel case
Jun 26, 2013
bc750f6
Merge pull request #1179 from mr29a/master
stof Jun 26, 2013
633a61a
Update assert validation length to new format
hugohenrique Jun 28, 2013
f657e7a
corrected the format of the definition of assert Length
hugohenrique Jun 28, 2013
025e851
Merge pull request #1184 from hugohenrique/master
stof Jun 28, 2013
ab93e2b
Changed use of prependClientTransformer to addViewTransformer.
thvd Jul 2, 2013
7447614
fixed type hinting of Mailer
sstok Jul 7, 2013
09091a5
Update typo
ardianys Jul 8, 2013
71ab148
Merge pull request #1195 from ardianys/patch-1
stof Jul 8, 2013
4e86c0b
The format is required by FrameworkBundle
armetiz Jul 17, 2013
e047dd8
Merge pull request #1207 from armetiz/patch-1
stof Jul 17, 2013
e3b335e
Merge local variables with globals
armetiz Jul 18, 2013
f016998
group mergeGlobal inside sendMessage function
armetiz Jul 18, 2013
6fc28e4
Merge pull request #1209 from armetiz/patch-1
stof Jul 18, 2013
88f9ed7
add doc type
armetiz Jul 19, 2013
be211ec
Merge pull request #1191 from thvd/patch-1
stof Jul 25, 2013
4e1f7da
Fixed a link inside docs
DiliBau Jul 31, 2013
f821491
Merge pull request #1224 from DiliBau/patch-1
willdurand Jul 31, 2013
ea2ead6
fixed UserProvider::refreshUser() not checking the class-name
sstok Aug 9, 2013
96c5833
Merge pull request #1239 from sstok/fix-refreshuser-class
stof Aug 9, 2013
503c126
Fix mistaken field mapping for index
bangpound Aug 11, 2013
62c6faa
Fix spanish translation
xexu Aug 20, 2013
7f0abca
Extracting logic to a method in UserManipulator
Cydonia7 Aug 21, 2013
ea5a737
slovenian translations fixed
petk Aug 26, 2013
3b8643c
Merge pull request #1250 from peterkokot/patch-translations
stof Aug 27, 2013
1b19141
little fix to the section ref.
liuggio Aug 28, 2013
e536e8b
Merge pull request #1251 from liuggio/patch-1
stof Aug 28, 2013
db2fd4f
Reorder fields in registration form
fogs Sep 3, 2013
c835043
Merge pull request #1253 from fogs/master
stof Sep 3, 2013
46de68f
Added a link to the 1.3 doc in the readme
stof Sep 6, 2013
2038b75
Removed duplicate link to the doc
stof Sep 6, 2013
10f2b23
Removed isUser()
jaspernbrouwer Sep 9, 2013
4c093c8
Create validators.ca.yml
avinsol Sep 10, 2013
fe77b85
Merge pull request #1262 from avinsol/master
stof Sep 10, 2013
4a280b5
Merge pull request #1246 from xexu/master
stof Sep 10, 2013
2f1aa0c
Merge pull request #1240 from bangpound/couchdb-field-index
stof Sep 10, 2013
d67fedd
Merge pull request #1247 from Cydonia8/master
stof Sep 10, 2013
44be92e
Update FOSUserBundle.ca.yml
avinsol Sep 10, 2013
a19e42c
Merge pull request #1263 from avinsol/patch-1
stof Sep 11, 2013
80bf109
Corecting "užívateľksé"
PayteR Sep 12, 2013
e060f8c
Merge pull request #1266 from PayteR/patch-1
stof Sep 12, 2013
940c631
use GetResponseUserEvent on registration init
havvg Sep 12, 2013
1b8ffdb
Merge pull request #1271 from havvg/feature/userresponseevent-on-regi…
stof Sep 12, 2013
35890f4
Small Slovak language correction
PayteR Sep 13, 2013
a6c12cc
Merge pull request #1272 from PayteR/patch-2
stof Sep 13, 2013
23f4465
Fix typo in docs code example
bijibox Sep 16, 2013
1ee84a8
Merge pull request #1279 from bijibox/doc-typo-fix
stof Sep 16, 2013
0e428f7
Update doctrine.md
cordoval Sep 18, 2013
85ef11b
Merge pull request #1280 from cordoval/patch-1
stof Sep 19, 2013
5e46565
Merge branch '1.3.x'
stof Sep 23, 2013
988e106
Merge branch '1.3.x'
stof Sep 23, 2013
471f34b
Merge branch '1.3.x'
stof Sep 23, 2013
b4840d8
Removed PHP 5.5 from the allowed failures on travis
stof Sep 23, 2013
f1dee36
Added Hebrew translation
olegsv Sep 23, 2013
adef919
[Flash Notifications] make registering the FlashListener configurable
christickner Sep 27, 2013
6b9d72b
Added Integrity constraint violation for group name
avinsol Oct 2, 2013
4cb6a56
Added Integrity constraint violation for group name
avinsol Oct 2, 2013
dd033f2
Merge pull request #1298 from avinsol/patch-4
merk Oct 2, 2013
ee5db1a
Merge pull request #1297 from avinsol/patch-3
merk Oct 2, 2013
5a60adf
Revert "Added Integrity constraint violation for group name"
merk Oct 2, 2013
5e23633
Revert "Added Integrity constraint violation for group name"
merk Oct 2, 2013
343a4a5
Add vietnamese translation
spolischook Oct 9, 2013
f9ea1de
Merge pull request #1304 from spolischook/add-vietnamese-translation
stof Oct 9, 2013
4025c41
Merge pull request #1210 from armetiz/patch-doc
stof Oct 21, 2013
b19b619
Fixed typo in Norwegian Bokmål translation
orose Oct 27, 2013
0cb0302
Merge pull request #1315 from orose/TypoFix
stof Oct 28, 2013
90ee148
Create validators.gr.yml
Oct 31, 2013
c6338a7
Create FOSUserBundle.gr.yml
Oct 31, 2013
e543600
Merge pull request #1288 from christickner/flash_listener_configuration
merk Nov 7, 2013
3a42a3e
SK language fix
PayteR Nov 15, 2013
82fe46a
Update FOSUserBundle.pl.yml
emgiezet Nov 25, 2013
7f7bb1c
Update FOSUserBundle.pl.yml
emgiezet Nov 25, 2013
eb459d5
Merge pull request #1348 from emgiezet/master
stof Nov 25, 2013
2fef94f
Update validators.cs.yml
analogic Dec 2, 2013
2dcdff2
Merge pull request #1353 from analogic/patch-2
stof Dec 2, 2013
f7380a4
Merge pull request #1333 from PayteR/patch-4
stof Dec 2, 2013
7a5e29a
Merge pull request #1287 from olegsv/master
merk Dec 9, 2013
3657218
Fixed missing translations
nunojsferreira Dec 10, 2013
4251991
Merge pull request #1355 from nunojsferreira/patch-2
stof Dec 10, 2013
c608810
Fixed indentation problem
nunojsferreira Dec 10, 2013
945eebb
Merge pull request #1356 from nunojsferreira/patch-3
stof Dec 10, 2013
fb3a17b
Fixed duplicated open tag and message
mamartins Dec 16, 2013
6596b9d
Merge pull request #1369 from 0biwan/patch-1
stof Dec 16, 2013
5db04dd
Removed the old unique validator parameters.
aitboudad Dec 26, 2013
a02f6fe
Merge pull request #1377 from aitboudad/patch-1
stof Dec 26, 2013
afea530
Rework sendEmailAction to use GET parameter instead of Session compon…
tgallice Dec 27, 2013
2287cb8
Remove parameter constant
tgallice Dec 30, 2013
c66cb66
Merge pull request #1378 from tgallice/rework_resetting
stof Dec 30, 2013
da51ad9
Fixed wrong mail subject on password recovery
nunojsferreira Jan 6, 2014
826f29a
Merge pull request #1383 from nunojsferreira/patch-4
stof Jan 6, 2014
fa577ff
Updated lithuanian translations.
aurelijusrozenas Jan 9, 2014
0828095
Merge pull request #1386 from infro42/master
stof Jan 9, 2014
4d66b73
Update FOSUserBundle.es.yml
davidromani Jan 17, 2014
b9e34b8
Update FOSUserBundle.ca.yml
davidromani Jan 17, 2014
673a905
Merge pull request #1392 from davidromani/master
stof Jan 17, 2014
d0d115b
German translation all in same formality
Green-Cat Jan 19, 2014
58958e5
Merge pull request #1395 from Green-Cat/patch-1
stof Jan 19, 2014
16e38fb
To go with my previous pull request
Green-Cat Jan 22, 2014
da9a973
Merge pull request #1398 from Green-Cat/patch-2
stof Jan 22, 2014
62397ec
Add missed message translation
artemdigi Jan 26, 2014
23d15ad
Merge pull request #1402 from Smart-Core/master
stof Jan 26, 2014
20e6259
Updating the configuration_reference.md
Jan 31, 2014
e135b0d
Update FOSUserBundle.it.yml
Feb 11, 2014
3530753
Corrected typo in user_manager.md
Feb 12, 2014
a331543
Merge pull request #1415 from tuxone/patch-1
stof Feb 19, 2014
ae2be6c
Merge pull request #1416 from mbonneau/master
stof Feb 19, 2014
91ebe88
fixed german translation
jdreesen Feb 21, 2014
815055b
Merge pull request #1429 from jdreesen/patch-5
lsmith77 Feb 21, 2014
fabdb1f
Update Group.php
Szymciosek Feb 23, 2014
6147dc7
Update User.php
Szymciosek Feb 23, 2014
4f99643
Update UserManipulator.php
Szymciosek Feb 23, 2014
0d7aa04
Doctrine xml config
torbenbr Feb 26, 2014
6a79d37
Merge pull request #1431 from Szymciosek/patch-1
stof Mar 4, 2014
7867dfc
Merge pull request #1405 from sof1105/patch-1
stof Mar 4, 2014
6051f59
Added invalid message when passwords do not match
mathewrapid Mar 5, 2014
4872585
Update FOSUserBundle.sv.yml
mathewrapid Mar 10, 2014
54c1ac5
Update user_manager.md
allanbrault Mar 14, 2014
c410317
Merge pull request #1453 from allanbrault/patch-1
stof Mar 14, 2014
9b8bbbc
Merge pull request #1444 from mathewrapid/master
stof Mar 16, 2014
8d2c9f4
Update FOSUserBundle.nl.yml
rjbijl Mar 18, 2014
f8e9255
Merge pull request #1455 from rjbijl/dutch-translation
stof Mar 18, 2014
e7ad071
Note on deprecation
tweini Mar 30, 2014
3e06b5a
Create FOSUserBundle.th.yml
liverbool Apr 1, 2014
8a23bdf
translate to Thai.
liverbool Apr 1, 2014
b91b81e
translate to Thai.
liverbool Apr 1, 2014
3750c0c
Merge pull request #1464 from liverbool/master
stof Apr 1, 2014
87473fa
Fix consistency in Vietnamsese translation
haphan Apr 1, 2014
9895346
Merge pull request #1465 from haphan/patch-1
stof Apr 1, 2014
9e6dfa6
fix documentation `fos_user.from_email.sender_name`
toaotc Apr 2, 2014
041887f
Merge pull request #1466 from toaotc/patch-1
stof Apr 5, 2014
fa60226
Merge pull request #1463 from tweini/patch-1
stof Apr 5, 2014
eae85fd
Added Japanese translation for password.mismatch
miukoba Apr 8, 2014
e4c000a
Merge pull request #1470 from miukoba/master
stof Apr 8, 2014
254d2b6
Translated "User account is locked." error message
mdurys May 1, 2014
dfc9dfe
Fixed minor typo
yosmanyga May 7, 2014
13c173f
Merge pull request #1486 from yosmanyga/patch-1
stof May 7, 2014
63e308c
[SecurityContext] Use SecurityContextInterface.
aitboudad May 18, 2014
3969d7f
Merge pull request #1491 from aitboudad/patch-2
stof May 18, 2014
0b52c14
adding missing translation for security login
ziedjlassi May 19, 2014
b83dd8d
Suggestion on the bundle install step 1
vlad88sv Jun 7, 2014
a176e88
Update index.md
vlad88sv Jun 7, 2014
a93c355
Merge pull request #1502 from vlad88sv/master
stof Jun 8, 2014
71ed250
Merge branch '1.3.x'
stof Jun 13, 2014
8fa4614
Renamed to align with validators.pt.yml
Jun 22, 2014
36fc739
Update FOSUserBundle.en.yml
ysramirez Jun 30, 2014
49648fa
Fixed error : AcmeUserBundle should be compatible with FOS\UserBundle...
ousmaneNdiaye Jul 4, 2014
ba3e099
Merge pull request #1525 from ousmaneNdiaye/FixErrorDoc
stof Jul 4, 2014
be04c3b
[DX] Extends base controller Symfony class instead of ContainerAware
tgalopin Jul 5, 2014
42c6d18
Merge pull request #1518 from ysramirez/patch-1
merk Jul 8, 2014
f10671a
Merge pull request #1493 from ZiedJlassi/patch-2
merk Jul 8, 2014
27b6ac3
Merge pull request #1482 from mdurys/master
merk Jul 8, 2014
853ae14
Merge branch '1.3.x'
stof Jul 8, 2014
62ee628
Added HHVM to travis.yml
Nyholm Jul 9, 2014
f0e4ee9
Merge pull request #1532 from Nyholm/patch-1
stof Jul 9, 2014
5a1a917
Merge pull request #1433 from Szymciosek/patch-3
merk Jul 9, 2014
ef7ca32
Merge pull request #1432 from Szymciosek/patch-2
merk Jul 9, 2014
567f72c
Update validators.uk.yml
andrewmyhay Jul 31, 2014
6e94ac9
Update Changelog.md
wistly Jul 31, 2014
fe9ca48
Merge pull request #1552 from andrewmyhay/patch-1
merk Jul 31, 2014
1d586ca
Fix spelling errors in FOSUserBundle.ar.yml and validators.ar.yml
Arkni Aug 1, 2014
1fe261d
Merge pull request #1555 from Arkni/master
merk Aug 1, 2014
03edefb
Actualizar traducción FOSUserBundle.es.yml
jaimenj Aug 4, 2014
27a84ce
Merge pull request #1560 from jaimeninolesjimeno/patch-1
merk Aug 4, 2014
7db989e
Update groups.md
lucciano Aug 20, 2014
8acb3aa
Update groups.md
lucciano Aug 21, 2014
9e5d620
Update groups.md
lucciano Aug 21, 2014
094bea6
Improved the documentation about overwriting forms
stof Aug 23, 2014
a6ca14a
Add one single routing file and update documentation
aferrandini Sep 8, 2014
e009ce7
Merge pull request #1591 from aferrandini/group-routing-configuration…
stof Sep 8, 2014
8d8cfaf
Update email.txt.twig
Sep 12, 2014
7001669
Merge pull request #1594 from xavierfaucon/patch-2
stof Sep 12, 2014
5f313d0
Cleaning up uses
fejese Sep 17, 2014
d13bfc2
Merge pull request #1599 from fejese/cleanup-uses
stof Sep 17, 2014
559655e
Merge pull request #1554 from waldermort/patch-1
stof Sep 17, 2014
e3f8fcd
Merge pull request #1515 from Dudytz/master
stof Sep 17, 2014
1813840
Merge pull request #1194 from sstok/patch-3
stof Sep 17, 2014
353216f
Merge pull request #1318 from crash21/master
stof Sep 19, 2014
f89f380
Merge pull request #1575 from lucciano/patch-1
stof Sep 19, 2014
a05e866
[docs] validate invitation on registration only
nnscr Jan 23, 2014
349b637
minor #1400 [docs] validate invitation on registration only (nnscr)
stof Sep 20, 2014
364330c
Merge branch '1.3.x'
stof Sep 26, 2014
5a53273
Updated the changelog for 2.0.0-alpha1
stof Sep 26, 2014
a883bcb
Translations for the security messages
b-durand Jun 5, 2013
36d2dd2
minor #1149 Translations for the security messages (b-durand)
stof Sep 26, 2014
8488843
Tweaked the handling of error message in the login page
stof Sep 26, 2014
db749b3
Removed useless translations
stof Sep 26, 2014
f492498
Switched to PSR-4 instead of using target-dir in composer
stof Sep 26, 2014
05f7f43
Bumped the Symfony dependency to 2.3
stof Sep 26, 2014
20b97f6
minor #1528 [DX] Extends base controller Symfony class instead of Con…
stof Sep 26, 2014
f9abc64
Removed the option to switch to a different templating engine
stof Sep 26, 2014
bd15d22
Removed a useless test
stof Sep 26, 2014
747de84
Fix typo in validators.ar.yml
Arkni Sep 26, 2014
047b0e6
Removed the deprecated entity classes
stof Sep 26, 2014
e073ce7
minor #1556 update validators.ar.yml (Arkni)
stof Sep 26, 2014
c27d16a
minor #1257 Issue #1192 - removed isUser() (jaspernbrouwer)
stof Sep 26, 2014
56bd660
Updated the changelog
stof Sep 26, 2014
5c03ad2
minor #1613 Removed the option to switch to a different templating en…
stof Sep 29, 2014
1e4689e
minor #1614 Removed the deprecated entity classes (stof)
stof Sep 29, 2014
b121804
[WCM] Hide user password in CLI if possible
nykopol Dec 26, 2013
0619989
minor #1376 [WCM] Hide user password in CLI if possible (nykopol)
stof Sep 29, 2014
f6be7fd
Hide user password in CLI if possible
nykopol Dec 26, 2013
d47ad32
minor #1376 Hide user password in CLI if possible (nykopol)
stof Sep 29, 2014
96e4542
Removed the BC layer for Symfony 2.1 in the previous merge
stof Sep 29, 2014
7dab23d
simplifying controllers by using Symfony Controller shortcuts
Oct 2, 2014
c6ee27d
minor #1624 simplifying controllers by using Symfony Controller short…
stof Oct 3, 2014
e5ee24f
Fixed the retrieval of the DI parameter in the controller
stof Oct 4, 2014
327a7e1
Add missing pt_BR translations
andreia Sep 1, 2014
3be6e7b
minor #1585 Add missing pt_BR translations (andreia)
stof Oct 4, 2014
659b5fe
Update overriding_controllers.md
Oct 9, 2014
f4f7dff
Rename validators.gr.yml to validators.el.yml
Oct 9, 2014
b277f7c
Rename FOSUserBundle.gr.yml to FOSUserBundle.el.yml
Oct 9, 2014
05b6c30
Merge pull request #1636 from crash21/master
stof Oct 10, 2014
cac56e0
Merge pull request #1635 from apsylone/patch-1
stof Oct 10, 2014
d731615
Remove quotes as they are invalid syntax
msjyoo Oct 20, 2014
9714a92
minor #1652 Remove quotes as they are invalid syntax (sekjun9878)
stof Oct 20, 2014
3565dfb
Merge branch '1.3.x'
stof Nov 19, 2014
2c378af
Merge branch '1.3.x'
stof Dec 17, 2014
4ceecb6
Merge branch '1.3.x'
stof Dec 29, 2014
d3a9f4e
Update configuration_reference.md
piotrantosik Jan 5, 2015
c2eba41
Merge branch '1.3.x'
stof Jan 18, 2015
7c220cf
Added basic XML Support
wouterj Dec 20, 2013
830b368
feature #1373 Added basic XML Support (WouterJ)
stof Jan 19, 2015
7b0f26f
Merge branch '1.3.x'
stof Jan 19, 2015
cb3a5d3
minor #1715 Update configuration_reference.md (piotrantosik)
stof Jan 19, 2015
e71ff8a
minor #1435 Doctrine xml config (TorbenBr)
stof Jan 19, 2015
145b716
Merge branch '1.3.x'
stof Jan 19, 2015
f54031a
Merge branch '1.3.x'
stof Jan 20, 2015
4297460
Switched the documentation from Markdown to ReStructuredText
javiereguiluz Jan 8, 2015
0ff86c3
Changed another needed link reference
javiereguiluz Jan 8, 2015
dd02ad8
Added configuration blocks and other minor fixes
javiereguiluz Jan 8, 2015
1f76a59
Fixed minor syntax issue
javiereguiluz Jan 16, 2015
4965cc5
Added a hidden TOC required by Sphinx/reStructuredText
javiereguiluz Jan 16, 2015
06d0560
fixed all the problems spotted by Wouter
javiereguiluz Jan 16, 2015
927a69a
Use a real TOC to provide the list of next articles
javiereguiluz Jan 16, 2015
2aee10b
Fixed some more syntax issues
javiereguiluz Jan 27, 2015
80da258
Added a change that was made in another commit
javiereguiluz Jan 27, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
Changelog
=========

### 2.0.0 (2014-XX-XX)

* [BC break] The deprecated entity classes have been removed.
* The minimum requirement for Symfony has been bumped to 2.3 (older versions are already EOLed).
* [BC break] ``UserInterface::isUser`` has been removed as it was used only by the old validation logic removed a long time ago.
* [BC break] The ``FOSUserBundle:Security:login.html.twig`` template now receives an AuthenticationException in the ``error``
variable rather than an error message.
* [BC break] The templating engine configuration has been removed, as well as the related code.
* [BC break] Changed the XML namespace to `http://friendsofsymfony.github.io/schema/dic/user`

### 2.0.0-alpha1 (2014-09-26)

* Updated many translations
* Changed the way to pass the email to the page asking to check the email to avoid issues with non-blocking sessions
* Changed the fos_user_security_check route to enforce POST
* Removed the deprecated UserManager and GroupManager classes for the different Doctrine implementations
* [BC break] Refactored the structure of controller to dispatch events instead of using form handlers
* Removed all form handlers
* [BC break] Changed Datetime properties of default User entity that were nullable to default to null when no value supplied
* [BC break] Updated schema.xml for Propel BaseUser class to allow nullable and typehint accordingly

### 1.3.5 (2014-09-04)

This release fixes a security issue. You are encouraged to update
Expand Down
4 changes: 2 additions & 2 deletions Command/ChangePasswordCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use Symfony\Component\Console\Output\OutputInterface;

/**
* CreateUserCommand
* ChangePasswordCommand
*/
class ChangePasswordCommand extends ContainerAwareCommand
{
Expand Down Expand Up @@ -83,7 +83,7 @@ function($username) {
}

if (!$input->getArgument('password')) {
$password = $this->getHelper('dialog')->askAndValidate(
$password = $this->getHelper('dialog')->askHiddenResponseAndValidate(
$output,
'Please enter the new password:',
function($password) {
Expand Down
2 changes: 1 addition & 1 deletion Command/CreateUserCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function($email) {
}

if (!$input->getArgument('password')) {
$password = $this->getHelper('dialog')->askAndValidate(
$password = $this->getHelper('dialog')->askHiddenResponseAndValidate(
$output,
'Please choose a password:',
function($password) {
Expand Down
78 changes: 44 additions & 34 deletions Controller/ChangePasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,63 +11,73 @@

namespace FOS\UserBundle\Controller;

use Symfony\Component\DependencyInjection\ContainerAware;
use FOS\UserBundle\FOSUserEvents;
use FOS\UserBundle\Event\FormEvent;
use FOS\UserBundle\Event\FilterUserResponseEvent;
use FOS\UserBundle\Event\GetResponseUserEvent;
use FOS\UserBundle\Model\UserInterface;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
use FOS\UserBundle\Model\UserInterface;

/**
* Controller managing the password change
*
* @author Thibault Duplessis <[email protected]>
* @author Christophe Coevoet <[email protected]>
*/
class ChangePasswordController extends ContainerAware
class ChangePasswordController extends Controller
{
/**
* Change user password
*/
public function changePasswordAction()
public function changePasswordAction(Request $request)
{
$user = $this->container->get('security.context')->getToken()->getUser();
$user = $this->getUser();
if (!is_object($user) || !$user instanceof UserInterface) {
throw new AccessDeniedException('This user does not have access to this section.');
}

$form = $this->container->get('fos_user.change_password.form');
$formHandler = $this->container->get('fos_user.change_password.form.handler');
/** @var $dispatcher \Symfony\Component\EventDispatcher\EventDispatcherInterface */
$dispatcher = $this->get('event_dispatcher');

$process = $formHandler->process($user);
if ($process) {
$this->setFlash('fos_user_success', 'change_password.flash.success');
$event = new GetResponseUserEvent($user, $request);
$dispatcher->dispatch(FOSUserEvents::CHANGE_PASSWORD_INITIALIZE, $event);

return new RedirectResponse($this->getRedirectionUrl($user));
if (null !== $event->getResponse()) {
return $event->getResponse();
}

return $this->container->get('templating')->renderResponse(
'FOSUserBundle:ChangePassword:changePassword.html.'.$this->container->getParameter('fos_user.template.engine'),
array('form' => $form->createView())
);
}
/** @var $formFactory \FOS\UserBundle\Form\Factory\FactoryInterface */
$formFactory = $this->get('fos_user.change_password.form.factory');

/**
* Generate the redirection url when the resetting is completed.
*
* @param \FOS\UserBundle\Model\UserInterface $user
*
* @return string
*/
protected function getRedirectionUrl(UserInterface $user)
{
return $this->container->get('router')->generate('fos_user_profile_show');
}
$form = $formFactory->createForm();
$form->setData($user);

/**
* @param string $action
* @param string $value
*/
protected function setFlash($action, $value)
{
$this->container->get('session')->getFlashBag()->set($action, $value);
$form->handleRequest($request);

if ($form->isValid()) {
/** @var $userManager \FOS\UserBundle\Model\UserManagerInterface */
$userManager = $this->get('fos_user.user_manager');

$event = new FormEvent($form, $request);
$dispatcher->dispatch(FOSUserEvents::CHANGE_PASSWORD_SUCCESS, $event);

$userManager->updateUser($user);

if (null === $response = $event->getResponse()) {
$url = $this->generateUrl('fos_user_profile_show');
$response = new RedirectResponse($url);
}

$dispatcher->dispatch(FOSUserEvents::CHANGE_PASSWORD_COMPLETED, new FilterUserResponseEvent($user, $request, $response));

return $response;
}

return $this->render('FOSUserBundle:ChangePassword:changePassword.html.twig', array(
'form' => $form->createView()
));
}
}
146 changes: 97 additions & 49 deletions Controller/GroupController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@

namespace FOS\UserBundle\Controller;

use Symfony\Component\DependencyInjection\ContainerAware;
use FOS\UserBundle\FOSUserEvents;
use FOS\UserBundle\Event\FilterGroupResponseEvent;
use FOS\UserBundle\Event\FormEvent;
use FOS\UserBundle\Event\GetResponseGroupEvent;
use FOS\UserBundle\Event\GroupEvent;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;

Expand All @@ -21,83 +27,139 @@
* @author Thibault Duplessis <[email protected]>
* @author Christophe Coevoet <[email protected]>
*/
class GroupController extends ContainerAware
class GroupController extends Controller
{
/**
* Show all groups
*/
public function listAction()
{
$groups = $this->container->get('fos_user.group_manager')->findGroups();
$groups = $this->get('fos_user.group_manager')->findGroups();

return $this->container->get('templating')->renderResponse('FOSUserBundle:Group:list.html.'.$this->getEngine(), array('groups' => $groups));
return $this->render('FOSUserBundle:Group:list.html.twig', array(
'groups' => $groups
));
}

/**
* Show one group
*/
public function showAction($groupname)
public function showAction($groupName)
{
$group = $this->findGroupBy('name', $groupname);
$group = $this->findGroupBy('name', $groupName);

return $this->container->get('templating')->renderResponse('FOSUserBundle:Group:show.html.'.$this->getEngine(), array('group' => $group));
return $this->render('FOSUserBundle:Group:show.html.twig', array(
'group' => $group
));
}

/**
* Edit one group, show the edit form
*/
public function editAction($groupname)
public function editAction(Request $request, $groupName)
{
$group = $this->findGroupBy('name', $groupname);
$form = $this->container->get('fos_user.group.form');
$formHandler = $this->container->get('fos_user.group.form.handler');
$group = $this->findGroupBy('name', $groupName);

$process = $formHandler->process($group);
if ($process) {
$this->setFlash('fos_user_success', 'group.flash.updated');
$groupUrl = $this->container->get('router')->generate('fos_user_group_show', array('groupname' => $group->getName()));
/** @var $dispatcher \Symfony\Component\EventDispatcher\EventDispatcherInterface */
$dispatcher = $this->get('event_dispatcher');

return new RedirectResponse($groupUrl);
$event = new GetResponseGroupEvent($group, $request);
$dispatcher->dispatch(FOSUserEvents::GROUP_EDIT_INITIALIZE, $event);

if (null !== $event->getResponse()) {
return $event->getResponse();
}

return $this->container->get('templating')->renderResponse('FOSUserBundle:Group:edit.html.'.$this->getEngine(), array(
/** @var $formFactory \FOS\UserBundle\Form\Factory\FactoryInterface */
$formFactory = $this->get('fos_user.group.form.factory');

$form = $formFactory->createForm();
$form->setData($group);

$form->handleRequest($request);

if ($form->isValid()) {
/** @var $groupManager \FOS\UserBundle\Model\GroupManagerInterface */
$groupManager = $this->get('fos_user.group_manager');

$event = new FormEvent($form, $request);
$dispatcher->dispatch(FOSUserEvents::GROUP_EDIT_SUCCESS, $event);

$groupManager->updateGroup($group);

if (null === $response = $event->getResponse()) {
$url = $this->generateUrl('fos_user_group_show', array('groupName' => $group->getName()));
$response = new RedirectResponse($url);
}

$dispatcher->dispatch(FOSUserEvents::GROUP_EDIT_COMPLETED, new FilterGroupResponseEvent($group, $request, $response));

return $response;
}

return $this->render('FOSUserBundle:Group:edit.html.twig', array(
'form' => $form->createview(),
'groupname' => $group->getName(),
'group_name' => $group->getName(),
));
}

/**
* Show the new form
*/
public function newAction()
public function newAction(Request $request)
{
$form = $this->container->get('fos_user.group.form');
$formHandler = $this->container->get('fos_user.group.form.handler');
/** @var $groupManager \FOS\UserBundle\Model\GroupManagerInterface */
$groupManager = $this->get('fos_user.group_manager');
/** @var $formFactory \FOS\UserBundle\Form\Factory\FactoryInterface */
$formFactory = $this->get('fos_user.group.form.factory');
/** @var $dispatcher \Symfony\Component\EventDispatcher\EventDispatcherInterface */
$dispatcher = $this->get('event_dispatcher');

$group = $groupManager->createGroup('');

$dispatcher->dispatch(FOSUserEvents::GROUP_CREATE_INITIALIZE, new GroupEvent($group, $request));

$process = $formHandler->process();
if ($process) {
$this->setFlash('fos_user_success', 'group.flash.created');
$parameters = array('groupname' => $form->getData('group')->getName());
$url = $this->container->get('router')->generate('fos_user_group_show', $parameters);
$form = $formFactory->createForm();
$form->setData($group);

return new RedirectResponse($url);
$form->handleRequest($request);

if ($form->isValid()) {
$event = new FormEvent($form, $request);
$dispatcher->dispatch(FOSUserEvents::GROUP_CREATE_SUCCESS, $event);

$groupManager->updateGroup($group);

if (null === $response = $event->getResponse()) {
$url = $this->generateUrl('fos_user_group_show', array('groupName' => $group->getName()));
$response = new RedirectResponse($url);
}

$dispatcher->dispatch(FOSUserEvents::GROUP_CREATE_COMPLETED, new FilterGroupResponseEvent($group, $request, $response));

return $response;
}

return $this->container->get('templating')->renderResponse('FOSUserBundle:Group:new.html.'.$this->getEngine(), array(
return $this->render('FOSUserBundle:Group:new.html.twig', array(
'form' => $form->createview(),
));
}

/**
* Delete one group
*/
public function deleteAction($groupname)
public function deleteAction(Request $request, $groupName)
{
$group = $this->findGroupBy('name', $groupname);
$this->container->get('fos_user.group_manager')->deleteGroup($group);
$this->setFlash('fos_user_success', 'group.flash.deleted');
$group = $this->findGroupBy('name', $groupName);
$this->get('fos_user.group_manager')->deleteGroup($group);

$response = new RedirectResponse($this->generateUrl('fos_user_group_list'));

return new RedirectResponse($this->container->get('router')->generate('fos_user_group_list'));
/** @var $dispatcher \Symfony\Component\EventDispatcher\EventDispatcherInterface */
$dispatcher = $this->get('event_dispatcher');
$dispatcher->dispatch(FOSUserEvents::GROUP_DELETE_COMPLETED, new FilterGroupResponseEvent($group, $request, $response));

return $response;
}

/**
Expand All @@ -106,13 +168,13 @@ public function deleteAction($groupname)
* @param string $key property name
* @param mixed $value property value
*
* @throws NotFoundException if user does not exist
* @throws NotFoundHttpException if user does not exist
* @return \FOS\UserBundle\Model\GroupInterface
*/
protected function findGroupBy($key, $value)
{
if (!empty($value)) {
$group = $this->container->get('fos_user.group_manager')->{'findGroupBy'.ucfirst($key)}($value);
$group = $this->get('fos_user.group_manager')->{'findGroupBy'.ucfirst($key)}($value);
}

if (empty($group)) {
Expand All @@ -121,18 +183,4 @@ protected function findGroupBy($key, $value)

return $group;
}

protected function getEngine()
{
return $this->container->getParameter('fos_user.template.engine');
}

/**
* @param string $action
* @param string $value
*/
protected function setFlash($action, $value)
{
$this->container->get('session')->getFlashBag()->set($action, $value);
}
}
Loading