mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/12684] Use a switch statement for readability
PHPBB3-12684
This commit is contained in:
parent
00c2efca60
commit
5b3b0edd80
1 changed files with 13 additions and 13 deletions
|
@ -280,20 +280,20 @@ class add extends \phpbb\console\command\command
|
||||||
*/
|
*/
|
||||||
protected function send_activation_email($user_id)
|
protected function send_activation_email($user_id)
|
||||||
{
|
{
|
||||||
if ($this->config['require_activation'] == USER_ACTIVATION_SELF)
|
switch ($this->config['require_activation'])
|
||||||
{
|
{
|
||||||
|
case USER_ACTIVATION_SELF:
|
||||||
$email_template = 'user_welcome_inactive';
|
$email_template = 'user_welcome_inactive';
|
||||||
$user_actkey = gen_rand_string(mt_rand(6, 10));
|
$user_actkey = gen_rand_string(mt_rand(6, 10));
|
||||||
}
|
break;
|
||||||
else if ($this->config['require_activation'] == USER_ACTIVATION_ADMIN)
|
case USER_ACTIVATION_ADMIN:
|
||||||
{
|
|
||||||
$email_template = 'admin_welcome_inactive';
|
$email_template = 'admin_welcome_inactive';
|
||||||
$user_actkey = gen_rand_string(mt_rand(6, 10));
|
$user_actkey = gen_rand_string(mt_rand(6, 10));
|
||||||
}
|
break;
|
||||||
else
|
default:
|
||||||
{
|
|
||||||
$email_template = 'user_welcome';
|
$email_template = 'user_welcome';
|
||||||
$user_actkey = '';
|
$user_actkey = '';
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!class_exists('messenger'))
|
if (!class_exists('messenger'))
|
||||||
|
|
Loading…
Add table
Reference in a new issue