* @license http://www.gnu.org/licenses/gpl-2.0.html GPL version 2 * @category Stud.IP */ class Visibility_Buddies extends VisibilityAbstract { // Should this state be used? protected $activated = true; // What number does this state get in the database? protected $int_representation = 2; // How is the state displayed in the settings? protected $display_name = 'Kontakte'; // Description for the state protected $description = "nur für meine Kontakte sichtbar"; // When do two users have this state function verify($user_id, $other_id) { if ($other_id === 'nobody') { return false; } return $user_id == $other_id || Contact::CountBySQL('owner_id=? AND user_id=?', [$user_id, $other_id]); } } ?>