Thanks BabRay. I finally managed in a different way. Instead of struggling with registration form, I removed the options there. Once user registered, they can upload their image within the website. I stored the image files in some folders and appended the files name to Modx user database table (in the extended fields) as suggested you.Following is the code.
<?php
//assigning image file name to user database
$profile = $modx->user->getOne('Profile');
// get the array of extended user profile attributes
$extended = $profile->get('extended');
// add the value of the element for key `authorPhoto`
$extended['authorPhoto'] = $_FILES['userfile']['name'];
$profile->set('extended', $extended);
$profile->save();
It is working.with the html <img src="[[++base_url]path/to/image/directory/[[+userext.authorPhoto]]">..
As a followup, I decided that uploadImageform chunk should be shown to those who is not updated their image.So I tried the following snippet.
<?php
$profile = $modx->user->getOne('Profile');
if ($profile)
{
$extended=$profile->get('extended');
if ($extended['authorPhoto']==0)
{
$output = $modx->getChunk($uploadImage_show_option);
return $output;
}}
It seems some problem with if condition statement above.The form is not load for both the cases. I am trying to rectify that. Any obvious errors?
Manikandan