3 * Table Definition for oauth_application_user
5 require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
7 class Oauth_application_user extends Memcached_DataObject
10 /* the code below is auto generated do not remove the above tag */
12 public $__table = 'oauth_application_user'; // table name
13 public $profile_id; // int(4) primary_key not_null
14 public $application_id; // int(4) primary_key not_null
15 public $access_type; // tinyint(1)
16 public $token; // varchar(255)
17 public $created; // datetime not_null
18 public $modified; // timestamp not_null default_CURRENT_TIMESTAMP
21 function staticGet($k,$v=NULL) {
22 return Memcached_DataObject::staticGet('Oauth_application_user',$k,$v);
24 /* the code above is auto generated do not remove the tag below */
27 static function getByKeys($user, $app)
29 if (empty($user) || empty($app)) {
33 $oau = new Oauth_application_user();
35 $oau->profile_id = $user->id;
36 $oau->application_id = $app->id;
39 $result = $oau->find(true);
41 return empty($result) ? null : $oau;