I am using the following snippet as a postHook in Register snippet to add Photo (image of the the user) in registration. Code works, but error is coming the image is not found (404 error).
<?php
$profile = $hook->getValue('register.profile');
// get the array of extended user profile attributes
$extended = $profile->get('extended');
// my register form value is "authorPhoto" and it is file type input
$extended['authorPhoto'] => true;
$profile->set('extended', $extended);
$profile->save();
and retrieving the extended field values like these inside my other documents
<?php
// get the array of extended user profile attributes
$profile = $modx->user->getOne('Profile');
$modx->toPlaceholders($profile->get('extended'),'userext');
by using
Can somebody what causes this error? Is there any better way to add image file in to modx user profile? Thanks in Advance.
Regards
Manikandan