Hi,
I want to add a metadata field to all users in my page. I want it for all registered users and for the new registers too.
I tried to add a plugin for the new registers:
elgg_register_event_handler('init', 'system', 'registro_nuevo_init');
function registro_nuevo_init() {
elgg_register_event_handler('init', 'system', 'registro_nuevo_inicializa');
}
function registro_nuevo_inicializa() {
elgg_register_event_handler('create', 'user', 'inicializa_datos');
}
function inicializa_datos($event, $type, $user) {
$user->puntuacion = '0';
}
But I don't get what I want. (To change registered users I have no idea how to do).
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.
- iionly@iionly
iionly - 0 likes
You must log in to post replies.For new users:
For existing users you could create a script you directly call/execute once (e.g. named it user_update.php and save it in the Elgg install root folder and then call it in your browser with site.url/user_update.php). The following is for Elgg 2.x versions: