The problem was that the self registered user was not seen in the users list.
I found that the value stored in 'schools' field of 'staff' table in the database in the record of the self registered user is ',,'. When I change this to NULL the new user became visible in the list of users. That's why I made a hack in modules/Users/User.php. I changed the lines of code starting on line 330 from:
if ( $column!=='PASSWORD')
$values .= "'" . $value . "',";
else
...
to:
if( $column=='SCHOOLS'){
$value = str_replace(",,","",$value);
$values .= "'" . $value . "',";
}
elseif( $column!=='PASSWORD')
$values .= "'" . $value . "',";
else
...
I em not sure it is a good why to solve this issue, but this works for me.