Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kohinos-tav
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
agplv3
kohinos-tav
Commits
e5cec638
Commit
e5cec638
authored
May 25, 2021
by
Julien Jorry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix : bug in user creation in PROD with no password
parent
c3e0f943
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
UserAdmin.php
src/Application/Sonata/UserBundle/Admin/UserAdmin.php
+9
-0
No files found.
src/Application/Sonata/UserBundle/Admin/UserAdmin.php
View file @
e5cec638
...
...
@@ -26,6 +26,7 @@ use Sonata\CoreBundle\Form\Type\DatePickerType;
use
Sonata\UserBundle\Admin\Model\UserAdmin
as
BaseUserAdmin
;
use
Sonata\UserBundle\Form\Type\SecurityRolesType
;
use
Symfony\Component\Form\Extension\Core\Type\ChoiceType
;
use
Symfony\Component\Form\Extension\Core\Type\HiddenType
;
use
Symfony\Component\Form\Extension\Core\Type\LocaleType
;
use
Symfony\Component\Form\Extension\Core\Type\PasswordType
;
use
Symfony\Component\Form\Extension\Core\Type\RepeatedType
;
...
...
@@ -193,6 +194,14 @@ class UserAdmin extends BaseUserAdmin
'required'
=>
(
!
$this
->
getSubject
()
||
null
===
$this
->
getSubject
()
->
getId
()),
))
;
}
else
{
$formMapper
->
add
(
'plainPassword'
,
HiddenType
::
class
,
[
'data'
=>
random_bytes
(
10
),
'required'
=>
false
,
'validation_groups'
=>
false
])
;
}
$formMapper
->
end
()
->
with
(
'Profile'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment