Changeset 479

Show
Ignore:
Timestamp:
05/12/08 21:31:22 (8 months ago)
Author:
aarkerio
Message:

Messages to all class

Location:
trunk/app/controllers
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/controllers/catfaqs_controller.php

    r477 r479  
    127127    $this->data['Catfaq']['id']     = $catfaq_id; 
    128128     
    129     if ($this->Test->save($this->data['Catfaq'])) 
     129    if ($this->Catfaq->save($this->data['Catfaq'])) 
    130130    { 
    131131         $this->msgFlash('Category status changed', '/admin/catfaqs/listing'); 
  • trunk/app/controllers/users_controller.php

    r459 r479  
    1919 public function beforeFilter()  
    2020 { 
    21     $this->Auth->allow(array('blog', 'entry','portfolio', 'about', 'register', 'directory', 'bloggers', 'insert', 'validate', 'logout')); 
     21    $this->Auth->allow(array('blog', 'entry','portfolio', 'edit', 'about', 'register', 'directory', 'bloggers', 'insert', 'validate', 'logout')); 
    2222    parent::beforeFilter(); 
    2323 
     
    396396   } 
    397397  } 
     398 
     399 public function edit()  
     400 { 
     401  if ( !$this->Auth->user() ): 
     402      $this->redirect('/users/login'); 
     403      return true; 
     404  endif; 
     405 
     406  if ( $this->Auth->user('group_id') != 3 && $this->Auth->user('group_id') != 4 ): 
     407      $this->redirect('/users/edit'); 
     408      return true; 
     409  endif; 
     410 
     411  if ( empty($this->data['User']) ): 
     412 
     413      $this->layout    = 'portal'; 
     414       
     415      $this->Portal->statics(); // Using Portal components 
     416         
     417      $this->User->unbindModel($this->User->notNow); 
     418             
     419      $this->data = $this->User->read(null, $this->Auth->user('id')); 
     420 
     421   else: 
     422 
     423      if ($this->User->save($this->data['User'])): 
     424            $this->msgFlash('User has been updated.','/users/edit/'); 
     425      endif; 
     426 
     427   endif; 
     428 } 
    398429   
    399430 /***    ===== ADMIN METHODS====   ****/