Author Topic: [Mod] Send mail, if Admin enabled a user account  (Read 15827 times)

0 Members and 1 Guest are viewing this topic.

Rembrandt

  • Guest
[Mod] Send mail, if Admin enabled a user account
« on: December 04, 2010, 07:21:57 AM »
Hi!

 This Modification enabled it send mail, if Admin enabled a user account.
 
1.) create a new file and call it "activation_admin_acp.html" and store in lang/yourLang/email:
(deutsch)
Code: [Select]
Hallo {user_name},

Ein Account als "{user_status}" wurde für Sie auf "{site_name}" eingerichtet.

Ihre Zugangsdaten sind:
Username:  {user_name}
Passwort:  {user_password}

Sie können sich jetzt auf "{site_name}" mit ihren Username und Passwort einloggen.
 
Mit freundlichen Grüßen,
{site_name}

(english)
Code: [Select]
Hello {user_name},

an user account as "{user_status}" has been set for you on "{site_name}".

Login credentials:
Username:  {user_name}
Password:  {user_password}

You can now login on "{site_name}" with given username and password.
 
Yours sincerely,
{site_name}

2.) search in admin/users.php:

$user_invisible 
intval($HTTP_POST_VARS['user_invisible_'.$i]);

insert below:

//############################  Start Send Mail, if Admin enabled a user account #############      
      
$user_sendmail_per_admin intval($HTTP_POST_VARS['sendmail_per_admin_'.$i]);
//############################  Start Send Mail, if Admin enabled a user account #############


2.1) search:

$log
[] = $lang['user_add_success']." : <b>".format_text($user_name2)."</b>";

insert below:

//##########################  Start Send Mail, if Admin enabled a user account ####################    
      
if ($result && $user_sendmail_per_admin) {
      
$user_status = ($user_level== 9)? "Administrator" "Member";
        
      include(
ROOT_PATH.'includes/email.php');
      
$site_email = new Email();
      
$site_email->set_to($user_email);
      
$site_email->set_subject($lang['activation_success_emailsubject']);
      
$site_email->register_vars(array(
        
"user_name" => $user_name,
        
"site_name" => $config['site_name'],
        
"user_status" =>$user_status,
        
"user_password" => trim($HTTP_POST_VARS['user_password_'.$i])
       ));
      
$site_email->set_body("activation_admin_acp"$config['language_dir']);
      
$site_email->send_email();
    } 
//######################## End Send Mail, if Admin enabled a user account ######################## 


2.2) search:

show_radio_row
($lang['field_invisible'], "user_invisible_".$i0);

insert below:

//############################  Start Send Mail, if Admin enabled a user account ###########    
    
show_radio_row($lang['field_sendmail_per_admin'], "sendmail_per_admin_".$i1);
//############################  End Send Mail, if Admin enabled a user account ############# 


3.) search in lang/yourlang/admin.php:
(english)

$lang
['field_invisible'] = "Invisible";

insert below:

//############################  Start Send Mail, if Admin enabled a user account ###########
$lang['field_sendmail_per_admin'] = "Notify User per Mail";
//############################  End Send Mail, if Admin enabled a user account #############

(deutsch)

$lang
['field_invisible'] = "Unsichtbar sein";

insert below:

//############################  Start Send Mail, if Admin enabled a user account ###########
$lang['field_sendmail_per_admin'] = "Benachrichtige User per Mail";
//############################  End Send Mail, if Admin enabled a user account #############



mfg Andi
« Last Edit: December 04, 2010, 08:13:38 PM by Rembrandt »

Offline x23piracy

  • Sr. Member
  • ****
  • Posts: 420
    • View Profile
    • FHG
Re: [Mod] Send mail, if Admin enabled a user account
« Reply #1 on: December 04, 2010, 07:31:38 AM »
Hi,

danke gut gemacht :)
Kann man da noch ne Checkbox im Formular einbauen damit das optional bleibt?


Gruß Jens
« Last Edit: December 04, 2010, 08:44:31 AM by x23piracy »

Don't trust in md5 it's unsafe change your 4i galerys password hash algorythm! second pw db field, create new hashes over some time, deny old hash. Help members that cry, send informationen mail to the rest. Camouflage new pw hash in cookie. Done!

--(◔̯◔)--

Rembrandt

  • Guest
Re: [Mod] Send mail, if Admin enabled a user account
« Reply #2 on: December 04, 2010, 08:13:25 AM »
...
Kann man da noch ne Checkbox im Formular einbauen damit das optional bleibt?
....

Danke, ich habe meine ersten beitrag dahingehend editiert.
alle schritte 2.x) und schritt 3.)

mfg Andi

Offline x23piracy

  • Sr. Member
  • ****
  • Posts: 420
    • View Profile
    • FHG
Re: [Mod] Send mail, if Admin enabled a user account
« Reply #3 on: December 04, 2010, 08:43:08 AM »
Danke, ich habe meine ersten beitrag dahingehend editiert.
mfg Andi

Hi,

jetzt fehlt nur noch ein Hinweis für alle die nicht selbst darauf kommen, das man das
email template für english in den entsprechenden Ordner kopieren muss und natürlich
übersetzen (nicht du, der user).


Gruß Jens

Don't trust in md5 it's unsafe change your 4i galerys password hash algorythm! second pw db field, create new hashes over some time, deny old hash. Help members that cry, send informationen mail to the rest. Camouflage new pw hash in cookie. Done!

--(◔̯◔)--

Rembrandt

  • Guest
Re: [Mod] Send mail, if Admin enabled a user account
« Reply #4 on: December 04, 2010, 08:48:50 AM »
... und natürlich
übersetzen (nicht du, der user).
...
oder du  :mrgreen: und ich pflege es oben ein, (ich hasse google translate )

Offline x23piracy

  • Sr. Member
  • ****
  • Posts: 420
    • View Profile
    • FHG
Re: [Mod] Send mail, if Admin enabled a user account
« Reply #5 on: December 04, 2010, 09:12:53 AM »
Hi,

oder du  :mrgreen: und ich pflege es oben ein, (ich hasse google translate )

...ich will ja auch was von dir  :mrgreen:

Aber ob das jetzt das perfekte english ist kein Plan es war zumindest nicht google sondern mein Kopf:

Code: [Select]
Hello {user_name},

an user account as "{user_status}" has been set for you on "{site_name}".

Login credentials:
Username:  {user_name}
Password:  {user_password}

You can now login on "{site_name}" with given username and password.
 
Yours sincerely,
{site_name}

Uhhh Mensch gegen Maschine  :twisted:


Gruß Jens
« Last Edit: December 04, 2010, 09:31:43 AM by x23piracy »

Don't trust in md5 it's unsafe change your 4i galerys password hash algorythm! second pw db field, create new hashes over some time, deny old hash. Help members that cry, send informationen mail to the rest. Camouflage new pw hash in cookie. Done!

--(◔̯◔)--

Offline alex9193

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: [Mod] Send mail, if Admin enabled a user account
« Reply #6 on: July 15, 2014, 01:40:12 PM »
Can this MOD be changed so that a user receives an e-mail, when his registration is refused or when he can’t publish his pictures?