Support ⇒ Explain Please ⇒ Setting notification defaults for newly registered users ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexExplain Please

Setting notification defaults for newly registered users Reply to topic


Hi,

I'd like to change the default setting for the user_notify field in the users db for newly registered users to 1, rather than 0 (note: this is for new users, not existing users - I can do that in phpmyadmin).

Can someone confirm if the correct way to do this is to edit the following lines in register.php:

$result = $db->sql_query("INSERT INTO ".$user_prefix."_users (username, user_email, user_password, user_regdate, user_lastvisit, user_avatar $fieldlist) VALUES ('$username', '$user_email', '$new_password', '$user_regdate', $user_regdate, '{$MAIN_CFG['avatar']['default']}' $valuelist)"); ... $db->sql_query('INSERT INTO '.$user_prefix."_users (username, user_email, user_password, user_avatar, user_regdate, user_lastvisit $fieldlist) VALUES ('$row[username]', '$row[user_email]', '$row[user_password]', '".$MAIN_CFG['avatar']['default']."', '$row[user_regdate]', '$row[time]' $valuelist)");

If so, am I right in thinking that the idea would be to add user_notify to the list of fields in the above lines and then include the value 1 in the VALUES list?

Many thanks in advance and if I'm barking up the wrong tree please say so!

Note: WWW Private Listing - Staff Only

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
linux/Apache 2.4.27/MySQL 10.1.26-MariaDB/PHP 5.2.17/Dragonfly 9.2.1


Yes, that is correct.

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.6 / PHP 5.6 / DCVS


Great, many thanks Nano!

Note: WWW Private Listing - Staff Only

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
linux/Apache 2.4.27/MySQL 10.1.26-MariaDB/PHP 5.2.17/Dragonfly 9.2.1

All times are UTC


Jump to: