Changeset 3986 in subversion
- Timestamp:
- Sep 22, 2010 1:38:30 PM (3 years ago)
- Location:
- trunk/plugins/squirrelmail_usercopy
- Files:
-
- 2 edited
-
config.inc.php.dist (modified) (1 diff)
-
squirrelmail_usercopy.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/squirrelmail_usercopy/config.inc.php.dist
r3743 r3986 20 20 $rcmail_config['squirrelmail_identities_level'] = null; 21 21 22 // Set to false if you don't want the email address of the default identity 23 // (squirrelmail preference "email_address") to be saved as alias. 24 // Recommended: set to false if your squirrelmail config setting $edit_identity has been true. 25 $rcmail_config['squirrelmail_set_alias'] = true; -
trunk/plugins/squirrelmail_usercopy/squirrelmail_usercopy.php
r3985 r3986 23 23 public function create_user($p) 24 24 { 25 // Read plugin's config 26 $this->initialize(); 25 $rcmail = rcmail::get_instance(); 26 27 // Read plugin's config 28 $this->initialize(); 27 29 28 30 // read prefs and add email address 29 31 $this->read_squirrel_prefs($p['user']); 30 if (($this->identities_level == 0 || $this->identities_level == 2) && $ this->prefs['email_address'])32 if (($this->identities_level == 0 || $this->identities_level == 2) && $rcmail->config->get('squirrelmail_set_alias') && $this->prefs['email_address']) 31 33 $p['user_email'] = $this->prefs['email_address']; 32 34 return $p; … … 84 86 $rcmail = rcmail::get_instance(); 85 87 86 // Load plugin's config file88 // Load plugin's config file 87 89 $this->load_config(); 88 90 89 // Set identities_level for operations of this plugin91 // Set identities_level for operations of this plugin 90 92 $ilevel = $rcmail->config->get('squirrelmail_identities_level'); 91 if ($ilevel === null)92 $ilevel = $rcmail->config->get('identities_level', 0);93 if ($ilevel === null) 94 $ilevel = $rcmail->config->get('identities_level', 0); 93 95 94 $this->identities_level = intval($ilevel);95 }96 $this->identities_level = intval($ilevel); 97 } 96 98 97 99 private function read_squirrel_prefs($uname) … … 154 156 $db_charset = $rcmail->config->get('squirrelmail_db_charset'); 155 157 156 if ($db_charset)157 $db->query('SET NAMES '.$db_charset);158 if ($db_charset) 159 $db->query('SET NAMES '.$db_charset); 158 160 159 161 $sql_result = $db->query('SELECT * FROM '.$userprefs_table.' WHERE user=?', $uname); // ? is replaced with emailaddress
Note: See TracChangeset
for help on using the changeset viewer.
