Conditions | 3 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | public function initialize(User $user) |
||
29 | { |
||
30 | if ($this->session->has(Session::USER_ID) && $this->session->get(Session::USER_ID) === $user->getId()) { |
||
31 | return; |
||
32 | } |
||
33 | |||
34 | $this->session->set(Session::IS_LOGGED_IN, true); |
||
35 | $this->session->set(Session::USER_ID, $user->getId()); |
||
36 | $this->session->set(Session::USERNAME, $user->getUsername()); |
||
37 | $this->session->set(Session::EMAIL, $user->getEmail()); |
||
38 | $this->session->set(Session::IS_GRAVATAR_ALLOWED, $user->isGravatarAllowed()); |
||
39 | $this->session->set(Session::LANGUAGE_IDENTIFIER, $user->getUserLanguage()->getIdentifier()); |
||
40 | } |
||
42 |