1
jonas
Change new register notification option default
  • 2004/9/3 17:38

  • jonas

  • Just popping in

  • Posts: 96

  • Since: 2004/1/27


By default when someone registers... the default notification setting is private message...
is there anyway to change that to email?

2
ackbarr
Re: Change new register notification option default

you can do so if you modify register.php:

find (line 201 for me):
$newuser->setVar('user_mailok',$user_mailok);

and add the following after:
// ## Hack to set default notification method to email
$newuser->setVar('notify_method', 2);

3
Mithrandir
Re: Change new register notification option default

A better way, which would also make this the default method for users created directly in the admin area could be to change the kernel/user.php
function XoopsUser($id=-1) {
    
$this->initVar('...', x, x, x);
    
$this->initVar('...', x, x, x);
    
$this->initVar('notify_method', XOBJ_DTYPE_INT, 2, false);
}
where the third parameter (2) is the value it should have. Actually the best solution would be to use the constant for it - defined in common.php, I believe, and called something like XOOPS_NOTIFYMETHOD_EMAIL

4
jonas
Re: Change new register notification option default
  • 2004/9/4 0:19

  • jonas

  • Just popping in

  • Posts: 96

  • Since: 2004/1/27


Thanks Guys... i did the later and all is well!!

Thanks again