src/Oro/Bundle/DemoDataBundle/Migrations/Data/Demo/ORM/LoadEmailData.php 1 location
|
@@ 133-143 (lines=11) @@
|
| 130 |
|
/** |
| 131 |
|
* @param User $user |
| 132 |
|
*/ |
| 133 |
|
protected function setSecurityContext($user) |
| 134 |
|
{ |
| 135 |
|
$securityContext = $this->container->get('security.context'); |
| 136 |
|
$token = new UsernamePasswordOrganizationToken( |
| 137 |
|
$user, |
| 138 |
|
$user->getUsername(), |
| 139 |
|
'main', |
| 140 |
|
$this->getReference('default_organization') |
| 141 |
|
); |
| 142 |
|
$securityContext->setToken($token); |
| 143 |
|
} |
| 144 |
|
|
| 145 |
|
/** |
| 146 |
|
* @param $randomTemplate |
src/Oro/Bundle/ReportCRMBundle/Tests/Functional/DataFixtures/LoadLeadsData.php 1 location
|
@@ 214-220 (lines=7) @@
|
| 211 |
|
/** |
| 212 |
|
* @param User $user |
| 213 |
|
*/ |
| 214 |
|
protected function setSecurityContext($user) |
| 215 |
|
{ |
| 216 |
|
$securityContext = $this->container->get('security.context'); |
| 217 |
|
$token = new UsernamePasswordOrganizationToken($user, $user->getUsername( |
| 218 |
|
), 'main', $this->organization); |
| 219 |
|
$securityContext->setToken($token); |
| 220 |
|
} |
| 221 |
|
|
| 222 |
|
/** |
| 223 |
|
* @param ObjectManager $manager |