CodeIgniter Forums
authenticate problem - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: authenticate problem (/showthread.php?tid=63909)



authenticate problem - manikingx - 12-21-2015

Hello,

My old coder added in all my funtions this code in start. 

admin_authenticate();


for exmple :
function enable()
{
admin_authenticate();

$this->db->where("category_id", $this->uri->segment(4));
$this->db->update("categories", array("category_enabled" => $this->uri->segment(5)));

$msg = $this->uri->segment(5)? "enabled" : "disabled";

redirect("admins/categories/listing/".$msg);
}




My question is where admin_authenticate();  ??? i wana edit this for redirect page ? please help i m new.


RE: authenticate problem - Diederik - 12-21-2015

The code structure indicates that is is a helper function. You can check some files in /application/helpers/ folder. Or you could just search for a string like "function admin_authenticate()" in all the files, that should generally show you where that specific function is defined.


RE: authenticate problem - lazyfox - 12-21-2015

Use your editor to find that function in all of your files. Or you can install another editor (Netbeans for php), open your one file using netbeans editor then press "ctrl"+click the function "admin_authenticate()" it will redirect you to the page where it is located.