function set_login_error($error_code) { $this->set_error(Err::lgnerr_conv($error_code)); }
public function getUsuarisAutocomplete() { $postdata = file_get_contents("php://input"); $R = json_decode($postdata, true); $RET = array(); try { $UM = new UsuarisModel(); $LlistatUsuaris = $UM->searchUsuaris($R['text']); foreach ($LlistatUsuaris as $OU) { $RET[] = $OU['DNI'] . ' | ' . $OU['Cog1'] . ' ' . $OU['Cog2'] . ', ' . $OU['Nom'] . ' | ' . $OU['UsuariID']; } echo json_encode($RET); } catch (\Exception $e) { Err::throwError($e); } }