Changeset 497 for pro-violet-viettel/sourcecode/application
- Timestamp:
- Nov 13, 2014 8:59:14 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php
r496 r497 203 203 { 204 204 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 } 205 211 $us_id = $id; 206 212 $user['updated_time'] = date('Y-m-d H:i:s'); … … 255 261 { 256 262 case 0: 263 if ($this->get_collaborator_by_login_name($username)){ 264 $col['passwd'] = $pass; 265 $this->updateCollaborator($col); 266 } 257 267 $us_id = $id; 258 268 $user['updated_time'] = date('Y-m-d H:i:s'); 259 $user['cellphone'] = $sentNumber;260 269 $this->updateUser($us_id, $user); 261 270 if ($isForgotPassword) 262 271 { 263 $sms = "Mat khau moi cua quy vi tren soanbaigiang.smas.vn la [".$pass word."]";272 $sms = "Mat khau moi cua quy vi tren soanbaigiang.smas.vn la [".$pass."]"; 264 273 }else{ 265 274 $sms = "Qui vi da doi thanh cong mat khau tren soanbaigiang.smas.vn. "; … … 363 372 } 364 373 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 365 382 function isExistcollaborator($collaborator) 366 383 { … … 374 391 $this->db->where('us_id', $us_id); 375 392 $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); 376 399 } 377 400
Note: See TracChangeset
for help on using the changeset viewer.