2012-07-09 21:51:36 +01:00
|
|
|
<?php
|
2020-07-31 14:12:48 +01:00
|
|
|
// This file is part of GNU social - https://www.gnu.org/software/social
|
|
|
|
//
|
|
|
|
// GNU social is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU Affero General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// GNU social is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU Affero General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Affero General Public License
|
|
|
|
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2012-07-09 21:51:36 +01:00
|
|
|
/**
|
|
|
|
* User_openid_prefs.php
|
2019-06-05 10:00:09 +01:00
|
|
|
*
|
2012-07-09 21:51:36 +01:00
|
|
|
* @category OpenID
|
2020-07-31 14:12:48 +01:00
|
|
|
* @package GNUsocial
|
2012-07-09 21:51:36 +01:00
|
|
|
* @author Evan Prodromou <evan@status.net>
|
|
|
|
* @copyright 2012 StatusNet, Inc.
|
2020-07-31 14:12:48 +01:00
|
|
|
* @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
|
2012-07-09 21:51:36 +01:00
|
|
|
*/
|
|
|
|
|
2020-07-31 14:12:48 +01:00
|
|
|
defined('GNUSOCIAL') || die();
|
2012-07-09 21:51:36 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Store preferences for OpenID use in StatusNet
|
|
|
|
*
|
2020-07-31 14:12:48 +01:00
|
|
|
* @category OpenID
|
|
|
|
* @package GNUsocial
|
|
|
|
* @author Evan Prodromou <evan@status.net>
|
|
|
|
* @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
|
2012-07-09 21:51:36 +01:00
|
|
|
*
|
2020-07-31 14:12:48 +01:00
|
|
|
* @see DB_DataObject
|
2012-07-09 21:51:36 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
class User_openid_prefs extends Managed_DataObject
|
|
|
|
{
|
|
|
|
public $__table = 'user_openid_prefs'; // table name
|
|
|
|
|
|
|
|
public $user_id; // The User with the prefs
|
|
|
|
public $hide_profile_link; // Hide the link on the profile block?
|
|
|
|
public $created; // datetime
|
2019-07-25 15:35:24 +01:00
|
|
|
public $modified; // timestamp
|
2012-07-09 21:51:36 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The One True Thingy that must be defined and declared.
|
|
|
|
*/
|
|
|
|
|
|
|
|
public static function schemaDef()
|
|
|
|
{
|
2019-06-05 10:00:09 +01:00
|
|
|
return [
|
|
|
|
'description' => 'Per-user preferences for OpenID display',
|
|
|
|
'fields' => [
|
|
|
|
'user_id' => [
|
2019-09-11 10:07:54 +01:00
|
|
|
'type' => 'int',
|
2019-06-05 10:00:09 +01:00
|
|
|
'not null' => true,
|
|
|
|
'description' => 'User whose prefs we are saving'
|
|
|
|
],
|
|
|
|
'hide_profile_link' => [
|
2019-09-11 10:07:54 +01:00
|
|
|
'type' => 'int',
|
2019-06-05 10:00:09 +01:00
|
|
|
'not null' => true,
|
|
|
|
'default' => 0,
|
|
|
|
'description' => 'Whether to hide profile links from profile block'
|
|
|
|
],
|
|
|
|
'created' => [
|
|
|
|
'type' => 'datetime',
|
|
|
|
'not null' => true,
|
|
|
|
'description' => 'date this record was created',
|
|
|
|
],
|
|
|
|
'modified' => [
|
|
|
|
'type' => 'timestamp',
|
|
|
|
'not null' => true,
|
|
|
|
'description' => 'date this record was modified',
|
|
|
|
],
|
|
|
|
],
|
2020-07-31 14:12:48 +01:00
|
|
|
'primary key' => ['user_id'],
|
|
|
|
'foreign keys' => [
|
|
|
|
'user_openid_prefs_user_id_fkey' => ['user', ['user_id' => 'id']],
|
2019-06-05 10:00:09 +01:00
|
|
|
],
|
|
|
|
];
|
2012-07-09 21:51:36 +01:00
|
|
|
}
|
|
|
|
}
|