Ignore:
Timestamp:
Nov 13, 2014 8:59:14 PM (11 years ago)
Author:
namnd
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php

    r496 r497  
    203203                        {
    204204                                case 0:
     205                                        if ($this->get_collaborator_by_login_name($username)){
     206                                                $col['login_name'] = $sentNumber;
     207                                                $col['cellphone'] = $sentNumber;
     208                                                $col['updated_time'] = date('Y-m-d H:i:s');
     209                                                $this->updateCollaborator($col);
     210                                        }
    205211                                        $us_id = $id;
    206212                                        $user['updated_time'] = date('Y-m-d H:i:s');
     
    255261                        {
    256262                                case 0:
     263                                        if ($this->get_collaborator_by_login_name($username)){
     264                                                $col['passwd'] = $pass;
     265                                                $this->updateCollaborator($col);
     266                                        }
    257267                                        $us_id = $id;
    258268                                        $user['updated_time'] = date('Y-m-d H:i:s');
    259                                         $user['cellphone'] = $sentNumber;
    260269                                        $this->updateUser($us_id, $user);
    261270                                        if ($isForgotPassword)
    262271                                        {
    263                                                 $sms = "Mat khau moi cua quy vi tren soanbaigiang.smas.vn la [".$password."]";
     272                                                $sms = "Mat khau moi cua quy vi tren soanbaigiang.smas.vn la [".$pass."]";
    264273                                        }else{
    265274                                                $sms = "Qui vi da doi thanh cong mat khau tren soanbaigiang.smas.vn. ";
     
    363372        }
    364373       
     374        function get_collaborator_by_login_name($collaborator)
     375        {
     376                $this->db->select('*')->from('tblcollaborator')->where('login_name', $collaborator)->limit(1);
     377                $result = $this->db->get()->row_array();
     378                return $result;
     379       
     380        }
     381       
    365382        function isExistcollaborator($collaborator)
    366383        {
     
    374391                $this->db->where('us_id', $us_id);
    375392                $this->db->update('tbluser', $data);
     393        }
     394       
     395        function updateCollaborator($us_id, $data)
     396        {
     397                $this->db->where('id', $us_id);
     398                $this->db->update('tblcollaborator', $data);
    376399        }
    377400       
Note: See TracChangeset for help on using the changeset viewer.