)
);
- // XXX: Make sure we have a oauth_token_association table. The table
- // is now in the main schema, but because it is being added with
- // a point release, it's unlikely to be there. This code can be
- // removed as of 1.0.
- $this->ensureOauthTokenAssociationTable();
-
$tokenAssoc = new Oauth_token_association();
$tokenAssoc->profile_id = $user->id;
}
}
- // XXX Remove this function when we hit 1.0
- function ensureOauthTokenAssociationTable()
- {
- $schema = Schema::get();
-
- $reqTokenCols = array(
- new ColumnDef('profile_id', 'integer', null, true, 'PRI'),
- new ColumnDef('application_id', 'integer', null, true, 'PRI'),
- new ColumnDef('token', 'varchar', 255, true, 'PRI'),
- new ColumnDef('created', 'datetime', null, false),
- new ColumnDef(
- 'modified',
- 'timestamp',
- null,
- false,
- null,
- 'CURRENT_TIMESTAMP',
- 'on update CURRENT_TIMESTAMP'
- )
- );
-
- $schema->ensureTable('oauth_token_association', $reqTokenCols);
- }
-
/**
* Show body - override to add a special CSS class for the authorize
* page's "desktop mode" (minimal display)