Created
February 2, 2012 19:13
-
-
Save mattlanham/1725189 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// No point applying an account id, unless we can tell the URL (this wont work for everything) | |
if(array_key_exists('SERVER_NAME', $_SERVER)) | |
{ | |
// Get the table name | |
$table_name = call_user_func($this->model.'::table'); | |
// Load config | |
$locked_tables = \Config::get('settings.protected_models'); | |
// Check if it's a protected modal | |
if(in_array($table_name, $locked_tables)) $this->where('account_id', \Session::get('account_id', \Inquirely::get_account()->id)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment