[ Index ] |
PHP Cross Reference of phpBB-3.1.12-deutsch |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * 4 * This file is part of the phpBB Forum Software package. 5 * 6 * @copyright (c) phpBB Limited <https://www.phpbb.com> 7 * @license GNU General Public License, version 2 (GPL-2.0) 8 * 9 * For full copyright and license information, please see 10 * the docs/CREDITS.txt file. 11 * 12 */ 13 14 namespace phpbb\db\migration\data\v310; 15 16 class auth_provider_oauth extends \phpbb\db\migration\migration 17 { 18 public function effectively_installed() 19 { 20 return $this->db_tools->sql_table_exists($this->table_prefix . 'auth_provider_oauth'); 21 } 22 23 public function update_schema() 24 { 25 return array( 26 'add_tables' => array( 27 $this->table_prefix . 'oauth_tokens' => array( 28 'COLUMNS' => array( 29 'user_id' => array('UINT', 0), // phpbb_users.user_id 30 'session_id' => array('CHAR:32', ''), // phpbb_sessions.session_id used only when user_id not set 31 'provider' => array('VCHAR', ''), // Name of the OAuth provider 32 'oauth_token' => array('MTEXT', ''), // Serialized token 33 ), 34 'KEYS' => array( 35 'user_id' => array('INDEX', 'user_id'), 36 'provider' => array('INDEX', 'provider'), 37 ), 38 ), 39 $this->table_prefix . 'oauth_accounts' => array( 40 'COLUMNS' => array( 41 'user_id' => array('UINT', 0), 42 'provider' => array('VCHAR', ''), 43 'oauth_provider_id' => array('TEXT_UNI', ''), 44 ), 45 'PRIMARY_KEY' => array( 46 'user_id', 47 'provider', 48 ), 49 ), 50 ), 51 ); 52 } 53 54 public function revert_schema() 55 { 56 return array( 57 'drop_tables' => array( 58 $this->table_prefix . 'oauth_tokens', 59 $this->table_prefix . 'oauth_accounts', 60 ), 61 ); 62 } 63 64 public function update_data() 65 { 66 return array( 67 array('module.add', array( 68 'ucp', 69 'UCP_PROFILE', 70 array( 71 'module_basename' => 'ucp_auth_link', 72 'modes' => array('auth_link'), 73 ), 74 )), 75 ); 76 } 77 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Jan 11 00:25:41 2018 | Cross-referenced by PHPXref 0.7.1 |