public function update_profile()
 {
     $data = array('nama_depan' => Input::get('first_name'), 'nama_belakang' => Input::get('last_name'), 'password' => Fungsi::enkripsi_password(Input::get('pass')), 'bio' => Input::get('bio'), 'tanggal_lahir' => Input::get('bday'), 'gender' => Input::get('gender'), 'alamat' => Input::get('address'), 'surel' => Input::get('email'), 'telpon' => Input::get('phone'), 'facebook' => Input::get('facebook'), 'twitter' => Input::get('twitter'), 'gplus' => Input::get('gplus'));
     Users::where('id', '=', Session::get('user_id'))->update($data);
     // $cal = Calendar::make();
     // $cal->setDate(Input::get('bday'));
     // $data_minat = array();
     // $data_minat['id_user'] = Session::get('user_id');
     // $data_minat['id_genre'] = Input::get('minat');
     // foreach ( as checked) {
     // 	UserMinat::create($data_input);
     // }
     return Redirect::to('/profile');
 }
Ejemplo n.º 2
0
 public function date_to_tgl($in)
 {
     $tgl = substr($in, 8, 2);
     $bln = substr($in, 5, 2);
     $thn = substr($in, 0, 4);
     if (checkdate($bln, $tgl, $thn)) {
         $out = substr($in, 8, 2) . " " . Fungsi::bulan2(substr($in, 5, 2)) . " " . substr($in, 0, 4);
     } else {
         $out = "<span class='error'>N/A</span>";
     }
     return $out;
 }