Changeset 3983 in subversion


Ignore:
Timestamp:
Sep 22, 2010 7:00:27 AM (3 years ago)
Author:
alec
Message:
  • Squirrelmail_usercopy: Fix identities_level setting (#1487006)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/squirrelmail_usercopy/squirrelmail_usercopy.php

    r3899 r3983  
    1717        public function init() 
    1818        { 
    19                 $rcmail = rcmail::get_instance(); 
    20  
    21         // Set identities_level for operations of this plugin 
    22                 $ilevel = $rcmail->config->get('squirrelmail_identities_level'); 
    23         if ($ilevel === null) 
    24                     $ilevel = $rcmail->config->get('identities_level', 0); 
    25         $this->identities_level = intval($ilevel); 
    26  
    2719                $this->add_hook('user_create', array($this, 'create_user')); 
    2820                $this->add_hook('identity_create', array($this, 'create_identity')); 
     
    3123        public function create_user($p) 
    3224        { 
     25        // Read plugin's config 
     26        $this->initialize(); 
     27 
    3328                // read prefs and add email address 
    3429                $this->read_squirrel_prefs($p['user']); 
     
    8580        } 
    8681 
     82        private function initialize() 
     83        { 
     84                $rcmail = rcmail::get_instance(); 
     85 
     86        // Load plugin's config file 
     87                $this->load_config(); 
     88 
     89        // Set identities_level for operations of this plugin 
     90                $ilevel = $rcmail->config->get('squirrelmail_identities_level'); 
     91        if ($ilevel === null) 
     92                    $ilevel = $rcmail->config->get('identities_level', 0); 
     93 
     94        $this->identities_level = intval($ilevel); 
     95    } 
     96 
    8797        private function read_squirrel_prefs($uname) 
    8898        { 
    89                 $this->load_config(); 
    9099                $rcmail = rcmail::get_instance(); 
    91100 
Note: See TracChangeset for help on using the changeset viewer.