Very nice idea, thank you. For future releases (if you plan any) it would be nice to select from which user the email is coming from, instead of just the administrator (I take it the first admistrator of site in case of multiple administrators.) Again, thanks for the plugin.
Was just looking over the code for this:
$personal[$method] = 1;
set_user_notification_setting($object->getGUID(), $method, ($personal[$method] == '1') ? true : false);
Is it enabling all notification methods for the user here? You explicitly declare $personal[$method] = 1; then check for it in the next line. So as far as I can see it will always be true and always turn on all notification methods...
ok, thanks for confirming that. The problem I foresee then, is that I want to use this plugin on an existing installation. However as soon as I do this it will mess with the notification settings that all my users have set for themselves. How about using the methods_override parameter of notify_user? I think that would make this plugin safe to add to an existing site.
me not see any value in all that fooling around with relationships and fancy 10 lines of php code footsies and merengue ;) if you want to check if a user is logging for the first time - the simple piece of code needed is ==> if ($user->last_login==0 why in this galaxy would you code any more ?
thats still no excuse for not just using data that is already available in the table ;oO no reason for replaciing ONE simple phrase with 10 - 20 or more lines of code, is it ? now can relationships code 10-20 lines of php execute faster than one variable reference $user->last_login==0 ? it does not execute faster LOLZ ;-) not everything in the world fits into our specially shaped relationship baskets ! read the mysql structures ;-X
CREATE TABLE IF NOT EXISTS `users_entity`
`guid` bigint(20) unsigned NOT NULL,
`name` text NOT NULL,
`username` varchar(128) NOT NULL DEFAULT '',
`last_action` int(11) NOT NULL DEFAULT '0',
`prev_last_action` int(11) NOT NULL DEFAULT '0',
`last_login` int(11) NOT NULL DEFAULT '0',
`prev_last_login` int(11) NOT NULL DEFAULT '0',
I went back through the code, you're right it shouldn't affect existing users. I missed the fact that you set a default welcome message time in activate.php.
Re: Dhrups suggestion - last_login is probably more reliable as well, just in case a relationship gets dropped somehow. Also, with the agressive metadata caching/pre-fetching coming in 1.8.9 there shouldn't be an issue using metadata for simple things like this :)
Well, I was almost happy to see it sending parsed message, %username% was correct but %password% is encrypted password string, not password string entered by user. It was easy one, had to add 2 lines of php to the start.php file:
$body = str_replace("%username%",$object->username,$body);
$body = str_replace("%password%",$object->password,$body);
Elgg 1.9 Compatibility: Works fine (the only glitch is, I could could not include an image in the message). It gives the following harmless warnings on the plugin settings page: Deprecated in 1.8: The settings/welcomemessage/edit view has been deprecated. Use the view plugins/welcomemessage/settings
Tested on 1.9.3 with around 10 non-bundled plugins installed.
Would be great if it let you enter welcome messages per language.
View Mark's plugins