- Timestamp:
- 03/01/13 10:11:21 (11 years ago)
- Location:
- sandbox/webservice/api/rest/admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/webservice/api/rest/admin/CommonFunctions.php
r7882 r7931 14 14 15 15 return str_replace( $array1, $array2, $param); 16 } 17 18 public function mascaraBirthDate($param) 19 { 20 $bDate = trim(preg_replace("/[^0-9]/", "", $param)); 21 22 $bDate = preg_replace('/(\d{2})(\d{2})(\d{4})/','$1/$2/$3',$bDate); 23 24 if( preg_match("#/#", $bDate) === 1 ) 25 $strDate = implode("-",array_reverse(explode('/',$bDate))); 26 27 return $strDate; 16 28 } 17 29 -
sandbox/webservice/api/rest/admin/CreateUserResource.php
r7878 r7931 35 35 $rgUser = trim($this->getParam('accountRg')); 36 36 $rgUF = trim($this->getParam('accountRgUf')); 37 $birthDate = $common->mascaraBirthDate($this->getParam('accountBirthDate')); 38 $st = $this->getParam('accountSt'); 39 $city = $this->getParam('accountCity'); 40 $sex = $this->getParam('accountSex'); 37 41 $description = $common->convertChar(trim($this->getParam('accountDescription'))); 38 42 … … 121 125 $fields['corporative_information_rguf'] = $rgUF; 122 126 $fields['corporative_information_description'] = $description; 127 $fields['corporative_information_datanascimento'] = $birthDate; 128 $fields['corporative_information_st'] = $st; 129 $fields['corporative_information_city'] = $city; 130 $fields['corporative_information_sexo'] = $sex; 123 131 124 132 // Validate Fields
Note: See TracChangeset
for help on using the changeset viewer.