Created
April 11, 2011 16:51
-
-
Save iammerrick/913849 to your computer and use it in GitHub Desktop.
By Role Name
This file contains hidden or 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
| <?php defined('SYSPATH') or die('No direct script access.'); | |
| class Model_Role extends Model_AutoModeler_ORM_Role{ | |
| public static function get_role_by_name($name) | |
| { | |
| $role = new self(); | |
| $role->load(DB::select()->where('name', '=', $name)); | |
| return $role; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment