Commit eeef56f5 authored by Fabrice Gangler's avatar Fabrice Gangler 🎨 Committed by Matthieu FAURE
Browse files

FIX(new user): load information correctly in session

The user type is required for using ACLs in views
and the user type ID is not sufficient.

Refs: #869
parent 32658cae
Pipeline #9686 passed with stage
in 3 minutes and 23 seconds
......@@ -446,7 +446,12 @@ class UsersController extends AppController
$message = "Success";
$this->Flash->success(__d("Forms", "Your are registred on the Comptoir du Libre, welcome !"));
if (!$this->request->is('json')) {
$currentUser = $this->Auth->identify();
$currentUser["user_type"] = $this->Users
// REDIRECTS TO ---> /<lang>/users/<idUser>
$lang = $this->selectedLanguage;
return $this->redirect("/$lang/users/" . $user->get('id'));
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment