Ignore:
Timestamp:
Jan 29, 2015 5:32:13 PM (10 years ago)
Author:
namnd
Message:
 
Location:
pro-violet-viettel/sourcecode/application/modules/frontend/controllers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pro-violet-viettel/sourcecode/application/modules/frontend/controllers/lecture.php

    r670 r717  
    1414    public function __construct() {
    1515        parent::__construct();
     16                $this->load->helper('language');
     17                $this->lang->load('messages', 'message');
    1618    }
    1719
     
    4244                $update_user_info=1;
    4345            }
     46                       
     47                        if ($u['province'] == '' && $u['p_id'] != ''){
     48                                $update_user_info=1;
     49                        }
    4450           
    4551            if (!$this->session->userdata('first_visit'))
     
    4955            }
    5056 
    51           $this->load->view('lecture_editor', array('username' => $username, 'licenseAvailable' => $licenseAvailable, 'first_visit' => $first_visit, 'licflashVars' => $aryParams,'update_user_info'=>$update_user_info,'us_id'=>$us_id,"p_period"=>$u['p_period'],"expire_date"=>date("d-m-Y", strtotime($u['expire_date']))));
     57          $this->load->view('lecture_editor', array('username' => $username, 'licenseAvailable' => $licenseAvailable, 'first_visit' => $first_visit, 'licflashVars' => $aryParams,'update_user_info'=>$update_user_info,'us_id'=>$us_id,"p_period"=>$u['p_period'],"expire_date"=>date("d-m-Y", strtotime($u['expire_date'])), "fullname"=>$info['fullname'], "school"=>$info['school'], "province"=>$u['province'], "provinces"=>lang('_PROVINCES_')));
    5258        } else {
    5359            redirect('/frontend/home/');
  • pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php

    r716 r717  
    242242            parse_str($user_info['user'], $info);
    243243            if ($input) {
    244                 if (strlen($input['fullname']) == 0) {
    245                     $result['errors'][] = array("content"=>lang('_SBG_FULLNAME_REQUIRED_MSG'),"field"=>"fullname");
    246                 }
     244                                if (array_key_exists('fullname', $input)) {
     245                                        if (strlen($input['fullname']) == 0) {
     246                                                $result['errors'][] = array("content"=>lang('_SBG_FULLNAME_REQUIRED_MSG'),"field"=>"fullname");
     247                                        }
     248                                }else{
     249                                        $input['fullname'] = $user['fullname'];
     250                                }
    247251                if (strlen($input['school']) == 0) {
    248252                    $result['errors'][] = array("content"=>lang('_SBG_REGISTER_VIP_SCHOOL_REQUIRED_MSG'),"field"=>"school");
     
    251255                $input['password'] = '';
    252256                $input['oldpass'] = '';
    253                 $input['province'] = '';
     257                //$input['province'] = '';
    254258                $this->load->model('user_model');
    255259                if (!isset($result['errors'])) {
Note: See TracChangeset for help on using the changeset viewer.