Hi Kevin,
you're right, the url must have good caracters, but I don't thing the trouble is here (just have to create a good url with filtering caracters, I have this on one of my website). The trouble is how to know, where I have to change the informations correctly to keep elgg working correctly.
Thank's for your answer.
Christophe
I think that this could be done with a very simple plugin.
The plugin would over-ride the register action like so:
register_action("register", true, $CONFIG->pluginspath . "myplugin/actions/register.php");
You would then take the actions/register.php file and copy it into
mod/myplugin/actions/register.php
You can then change the line near the top:
$username = get_input('username');
to autogenerate the username.
If you want the username to actually contain the guid, that is a problem, but you could do that by setting the username temporaily to a timestamp followed by say ten random characters and then reset it to what you want once the user has been created and you know the guid.
You would also need to over-ride the register view to remove the username.
And the login form and action to allow people to login using their email address.
I started my plugin and it's now possible to change the username.
But I want to insert the guid now.
I can create the new username but I cant save the new value. Can you telle me where is the trouble ?
My code :
$new_username = $guid.'_'.$username;
$new_user->username = $new_username;
$new_user->language = 'fr';
$new_user->save();
Can you tell me if save() is right ?
Thanks,
Christophe
Hi Kevin,
you're right, the url must have good caracters, but I don't thing the trouble is here (just have to create a good url with filtering caracters, I have this on one of my website). The trouble is how to know, where I have to change the informations correctly to keep elgg working correctly.
Thank's for your answer.
Christophe
I think that this could be done with a very simple plugin.
The plugin would over-ride the register action like so:
register_action("register", true, $CONFIG->pluginspath . "myplugin/actions/register.php");
You would then take the actions/register.php file and copy it into
mod/myplugin/actions/register.php
You can then change the line near the top:
$username = get_input('username');
to autogenerate the username.
If you want the username to actually contain the guid, that is a problem, but you could do that by setting the username temporaily to a timestamp followed by say ten random characters and then reset it to what you want once the user has been created and you know the guid.
You would also need to over-ride the register view to remove the username.
And the login form and action to allow people to login using their email address.
I started my plugin and it's now possible to change the username.
But I want to insert the guid now.
I can create the new username but I cant save the new value. Can you telle me where is the trouble ?
My code :
$new_username = $guid.'_'.$username;
$new_user->username = $new_username;
$new_user->language = 'fr';
$new_user->save();
Can you tell me if save() is right ?
Thanks,
Christophe
Hi Kevin,
you're right, the url must have good caracters, but I don't thing the trouble is here (just have to create a good url with filtering caracters, I have this on one of my website). The trouble is how to know, where I have to change the informations correctly to keep elgg working correctly.
Thank's for your answer.
Christophe
I think that this could be done with a very simple plugin.
The plugin would over-ride the register action like so:
register_action("register", true, $CONFIG->pluginspath . "myplugin/actions/register.php");
You would then take the actions/register.php file and copy it into
mod/myplugin/actions/register.php
You can then change the line near the top:
$username = get_input('username');
to autogenerate the username.
If you want the username to actually contain the guid, that is a problem, but you could do that by setting the username temporaily to a timestamp followed by say ten random characters and then reset it to what you want once the user has been created and you know the guid.
You would also need to over-ride the register view to remove the username.
And the login form and action to allow people to login using their email address.
I started my plugin and it's now possible to change the username.
But I want to insert the guid now.
I can create the new username but I cant save the new value. Can you telle me where is the trouble ?
My code :
$new_username = $guid.'_'.$username;
$new_user->username = $new_username;
$new_user->language = 'fr';
$new_user->save();
Can you tell me if save() is right ?
Thanks,
Christophe
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.