Exemple #1
0
 /**
  * Set the unique key for the roles
  * @Developer brandon
  * @Date Oct 12, 2010
  */
 public function unique_key($id = NULL)
 {
     if (!empty($id) && is_string($id) && !ctype_digit($id)) {
         return 'name';
     }
     return parent::unique_key($id);
 }
 /**
  * Allows finding roles by name.
  */
 public function unique_key($id)
 {
     if (!empty($id) and is_string($id) and !ctype_digit($id)) {
         return 'title';
     }
     return parent::unique_key($id);
 }