aboutsummaryrefslogtreecommitdiff
path: root/lib/models/ExternalUser.php
blob: 53a079ac5834cc262b15f4dc37fa771be8a3bb33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
/**
 * ExternalUser
 * Model class for blubber users that are not part of auth_user_md5 table
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of
 * the License, or (at your option) any later version.
 *
 * @author      Rasmus Fuhse <fuhse@data-quest.de>
 * @license     http://www.gnu.org/licenses/gpl-2.0.html GPL version 2
 * @category    Stud.IP
 * @since       5.0
 */

class ExternalUser extends SimpleORMap
{
    /**
     * Configures this model.
     *
     * @param array $config Configuration array
     */
    protected static function configure($config = [])
    {
        $config['db_table'] = 'external_users';
        $config['belongs_to']['host'] = [
            'class_name' => OERHost::class,
            'foreign_key' => 'host_id'
        ];
        $config['serialized_fields']['data'] = 'JSONArrayObject';
        parent::configure($config);
    }
}