Example #1
0
File: user.php Project: kuitang/sdi
 function _is_approved($field)
 {
     $approved_unis = new Approveduni();
     $approved_unis->where('uni', $this->{$field})->get();
     if (empty($approved_unis->id)) {
         $this->error_message('uni', "Your UNI was not approved on the Scholars' database.");
         return FALSE;
     } else {
         return TRUE;
     }
 }
Example #2
0
 function removeapproval($id)
 {
     if ($id) {
         $a = new Approveduni();
         $a->where('id', $id)->get();
         if (isset($a->id)) {
             $a->delete();
         } else {
             $this->session->set_flashdata('msg', 'Invalid id to remove.');
         }
     }
     redirect('users/approve');
 }