<?php

/**
 *
 * @see XenForo_Model_User
 */
class Waindigo_ResMans_Extend_XenForo_Model_User extends XFCP_Waindigo_ResMans_Extend_XenForo_Model_User
{

    /**
     *
     * @see XenForo_Model_User::prepareUser()
     */
    public function prepareUser(array $user)
    {
        $user = parent::prepareUser($user);

        if (!XenForo_Application::get('options')->waindigo_resMans_showResourcesTab) {
            if (!empty($user['resource_count'])) {
                $user['resource_count'] = 0;
            }
        }

        return $user;
    } /* END prepareUser */

    /**
     *
     * @see XenForo_Model_User::prepareUserCard()
     */
    public function prepareUserCard(array $user)
    {
        if (!XenForo_Application::get('options')->waindigo_resMans_showResourcesTab) {
            if (!empty($user['resource_count'])) {
                $user['resource_count'] = 0;
            }
        }

        return $user;
    } /* END prepareUserCard */
}