Is there a way to return a user model entry, userid, or some other identifier (and/or variables in general) from a successful registration form submission using the hidden redirect parameter?
In the docs for action/saveUser I see some mention of {id} in the redirect string, but I'm not exactly sure sure how this works (or if it's even related).
if (isset($_POST['redirect']) && mb_strpos($_POST['redirect'], '{userId}') !== false)
{
craft()->deprecator->log('UsersController::saveUser():userId_redirect', 'The {userId} token within the ‘redirect’ param on users/saveUser requests has been deprecated. Use {id} instead.');
$_POST['redirect'] = str_replace('{userId}', '{id}', $_POST['redirect']);
}
The reason I ask is that I am creating a multipart form that relies on the values of the previous form submission to continue (starting with user account registration). I essentially want to redirect back to the form, fill out the next part, submit, redirect back to form, fill out next, etc. (controlling the workflow with javascript or twig). FYI, using impersonate()
will not work for me in this case, because user must be admin, or in a custom 'manager' group.
As a side question, I also see craft()->userSession->setNotice(Craft::t('User saved.'));
used throughout the saveUser controller. Is there a corresponding getNotices()
similar to getErrors()
or some way to retrieve these on the front-end?