I think there's no need to override the register view/ form at all. Instead you could extend the view to add your "about me" input field. As I understand you only want to use this field for account verification purposes (with uservalidationbyadmin plugin) but not add a profile field that shows this info on the profile pages. You can take a look at a plugin of mine (http://community.elgg.org/plugins/791444/1.1/elgg-1819-full-age-restriction-checkbox) that adds a checkbox to the register page. This is not exactly the same as you need but you will can see at least how to extend the register form and how to evaluate the input.
The user input is evaluated in the function agerestriction_register_hook() in my plugin. In the same way you retrieve the "about me" input and save it for example as metadata:
function about_me_user_input($hook, $type, $value, $params) {
elgg_make_sticky_form('register');
$user = elgg_extract('user', $params);if (!$user instanceof ElggUser) {
return;
}$about_me = get_input('about_me', false);
if ($about_me) {
$user->about_me = $about_me;
return;
}
register_error(elgg_echo('error:no_about_me));
forward(REFERER);}
This function should be called by the 'action', 'register' plugin hook. Within the uservalidationbyadmin plugin the same plugin hook is used to manage the account validation / notify the admin. The notification is sent in the function uservalidationbyadmin_request_validation() that's in the lib/functions.php file. For the notification your can provide the text of the about_me input with $user->about_me. You only need to give the plugin hook function that retrieves the input in your plugin a higher priority (http://reference.elgg.org/elgglib_8php.html#a61ac4b86cafddcc201acda05a0e88997) to make sure it's executed before the plugin hook callback function in the uservalidationbyadmin plugin to be sure that the about_me input has already been retrieved and saved as metadata. The above code for the callback function might not be perfect yet. You might need to improve it to catch eventual misuse / faults of the users. For the rest that's necessary to extend the register page, you could take my plugin as a starting point and modify what's needed.
Thank you very much for your effort in your answer! It's not a piece of cake but I think I can do it.
At the benigging I tried to simply extend the view, as you suggest, but I did't succeed in making my additional field sticky. May be I'll be more fortunate this time!
I just noticed that I have the register form included in the Age Restriction plugin that I linked above. This would override the original core from. I don't think that this is necessary, i.e. it should work (better) when not overriding the core register fom.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.