Changeset 223

Show
Ignore:
Timestamp:
12/09/07 01:50:27 (1 year ago)
Author:
shupp
Message:

fixes for password changing, modify accounts Domain Menu link

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Framework/Module/Accounts/Modify.php

    r220 r223  
    168168 
    169169        // update password / comment if it's changing 
    170         $changeArray = array(); 
    171         $password    = $form->getElementValue('password'); 
    172         $comment     = $form->getElementValue('comment'); 
     170        $changePass    = 0; 
     171        $changeComment = 0; 
     172        $password      = $form->getElementValue('password'); 
     173        $comment       = $form->getElementValue('comment'); 
    173174        if (!empty($password)) { 
    174             $changeArray['clear_text_password'] = $password; 
     175            $account_info['clear_text_password'] = $password; 
     176            $changePass = 1; 
    175177        } 
    176178        if (!empty($comment)) { 
    177             $changeArray['comment'] = $comment; 
    178         } 
    179         if (!empty($changeArray)) { 
    180             $this->user->modUser($this->domain, $_REQUEST['account'], $changeArray); 
    181         } 
    182         if (isset($changeArray['clear_text_password'])  
    183             && $account == $this->user->loginUser['name']  
    184             && $this->domain == $this->user->loginUser['domain']) { 
     179            $account_info['comment'] = $comment; 
     180        } 
     181        if ($changePass || $changeComment) { 
     182            $this->user->modUser($this->domain, $_REQUEST['account'], $account_info); 
     183        } 
     184        if (isset($changePass) && $account == $this->user->loginUser['name']  
     185                && $this->domain == $this->user->loginUser['domain']) { 
    185186            $crypt = new Crypt_Blowfish((string)Framework::$site->config->mcryptKey); 
    186             $this->session->password = $crypt->encrypt($changeArray['clear_text_password']); 
     187            $this->session->password = $crypt->encrypt($password); 
    187188        } 
    188189 
  • trunk/Framework/Module/Accounts/Templates/Default/modifyAccount.tpl

    r79 r223  
    7373</form> 
    7474 
    75 {if $isDomainAdmin}<a href="./?module=Domains&amp;event=domainMenu&amp;domain={$domain}"><br /><b>{$LANG_Main_Menu}</b>{/if} 
     75{if $isDomainAdmin}<a href="./?module=Domains&amp;class=Menu&amp;domain={$domain}"><br /><b>{$LANG_Main_Menu}</b>{/if} 
    7676 
    7777</div>