Changeset 541 for trunk/app/views/users/admin_edit.ctp
- Timestamp:
- 05/21/08 15:27:00 (8 months ago)
- Files:
-
- 1 modified
-
trunk/app/views/users/admin_edit.ctp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/views/users/admin_edit.ctp
r441 r541 4 4 echo $javascript->link('myfunctions'); 5 5 6 if ($this->data["User"]["id"] != $cU['User']['id']) 7 { 8 echo 'Error'; 9 exit(); 10 } 6 if ($this->data["User"]["id"] != $session->read('Auth.User.id')): 7 die('Error'); 8 endif; 11 9 ?> 12 10 <div class="spaced"> … … 14 12 <?php 15 13 echo $html->para(null, $html->image('avatars/'.$this->data["User"]["avatar"], array("alt"=>$this->data["User"]["username"], "title"=>$this->data["User"]["username"]))); 16 ?>17 14 18 <?php19 15 echo $form->create('User', array('onsubmit'=>'return chkForm()')); 20 16 echo $form->hidden('User.id'); … … 23 19 <?php 24 20 25 echo '<legend>'.$ cU['User']['username'].'\'s account</legend>';21 echo '<legend>'.$session->read('Auth.User.username') .'\'s account</legend>'; 26 22 echo $form->input('User.pwd', array("size"=>9, "maxlength"=>9,"value"=>"")) . ' Left empty if you do not want to change'; 27 23 echo $form->error('User.pwd', 'A name is required.'); … … 34 30 35 31 // if the user belongs to admin group 36 if ($ cU['User']['id']== 1):32 if ($session->read('Auth.User.group_id') == 1): 37 33 echo $form->label('User.group_id', 'Group:' ); 38 34 echo $form->select('User.group_id', $Groups);
