<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/
return array(
  // Package -------------------------------------------------------------------
  'package' => array(
    'type' => 'module',
    'name' => 'user',
    'version' => '8.1.0',
    'revision' => '$Revision: 10271 $',
    'path' => 'application/modules/User',
    'repository' => 'socialengine.com',
    'title' => 'Members',
    'description' => 'Members',
    'author' => 'SocialEngine Core',
    'thumb' => 'application/modules/Core/externals/images/thumb.png',
    'dependencies' => array(
      array(
        'type' => 'module',
        'name' => 'core',
        'minVersion' => '8.0.0',
      ),
    ),
    'actions' => array(
      'install',
      'upgrade',
      'refresh',
      //'enable',
      //'disable',
    ),
    'callback' => array(
      'path' => 'application/modules/User/settings/install.php',
      'class' => 'User_Installer',
      'priority' => 3000,
    ),
    'directories' => array(
      'application/modules/User',
    ),
    'files' => array(
      'application/languages/en/user.csv',
    ),
  ),
  'loadDefault' => array(
    "js" => array(
      'externals/cropper/cropper.js',
      'application/modules/User/externals/scripts/flexcroll.js',
    ),
    'css' => array(
      'externals/cropper/cropper.css',
      'application/modules/User/externals/styles/coverphoto-user.css'
    ),
  ),
  // Hooks ---------------------------------------------------------------------
  'hooks' => array(
    array(
      'event' => 'onUserEnable',
      'resource' => 'User_Plugin_Core',
    ),
    array(
      'event' => 'onUserDeleteBefore',
      'resource' => 'User_Plugin_Core',
    ),
    array(
      'event' => 'onUserCreateAfter',
      'resource' => 'User_Plugin_Core',
    ),
    array(
      'event' => 'getAdminNotifications',
      'resource' => 'User_Plugin_Core',
    ),
    array(
      'event' => 'onActivityActionUpdateAfter',
      'resource' => 'User_Plugin_Core',
    ),
    array(
      'event' => 'onItemCreateAfter',
      'resource' => 'User_Plugin_Core',
    ),
  ),
  // Items ---------------------------------------------------------------------
  'items' => array(
    'user',
    'user_list',
    'user_list_item',
    'user_code',
    'user_verificationrequest',
    'user_follow',
    'user_avatar',
  ),
  // Routes --------------------------------------------------------------------
  'routes' => array(
    // User - General
    'user_support' => array(
      'route' => 'support/:action/*',
      'defaults' => array(
        'module' => 'user',
        'controller' => 'support',
        'action' => 'index'
      ),
      'reqs' => array(
        'controller' => '\D+',
        'action' => '\D+',
      )
    ),
    'user_extended' => array(
      'route' => 'members/:controller/:action/*',
      'defaults' => array(
        'module' => 'user',
        'controller' => 'index',
        'action' => 'index'
      ),
      'reqs' => array(
        'controller' => '\D+',
        'action' => '\D+',
      )
    ),
    'user_general' => array(
      'route' => 'members/:action/*',
      'defaults' => array(
        'module' => 'user',
        'controller' => 'index',
        'action' => 'browse'
      ),
      'reqs' => array(
        'action' => '(home|browse|fields|add-location|edit-location)',
      )
    ),
    'user_coverphoto' => array(
      'route' => 'user/coverphoto/:action/*',
      'defaults' => array(
        'module' => 'user',
        'controller' => 'coverphoto',
      ),
      'reqs' => array(
        'action' => '(get-cover-photo|get-main-photo|reset-cover-photo-position'
          . '|upload-cover-photo|choose-from-albums|remove-cover-photo)'
      ),
    ),

    // User - Specific
    'user_profile' => array(
      'route' => 'profile/:id/*',
      'defaults' => array(
        'module' => 'user',
        'controller' => 'profile',
        'action' => 'index'
      )
    ),

    'user_login' => array(
      //'type' => 'Zend_Controller_Router_Route_Static',
      'route' => '/login/*',
      'defaults' => array(
        'module' => 'user',
        'controller' => 'auth',
        'action' => 'login'
      )
    ),
    'user_verify' => array(
      //'type' => 'Zend_Controller_Router_Route_Static',
      'route' => '/login/verify/*',
      'defaults' => array(
        'module' => 'user',
        'controller' => 'auth',
        'action' => 'verify'
      )
    ),
    'user_logout' => array(
      'type' => 'Zend_Controller_Router_Route_Static',
      'route' => '/logout',
      'defaults' => array(
        'module' => 'user',
        'controller' => 'auth',
        'action' => 'logout'
      )
    ),
    'user_signup' => array(
      'route' => '/signup/:action/*',
      'defaults' => array(
        'module' => 'user',
        'controller' => 'signup',
        'action' => 'index'
      )
    ),
  )
);