You are here

function photos_access_init in Album Photos 7.3

Implements hook_init().

File

photos_access/photos_access.module, line 629

Code

function photos_access_init() {
  global $user;
  drupal_add_css(drupal_get_path('module', 'photos_access') . '/photos_access.css');
  drupal_add_js(drupal_get_path('module', 'photos_access') . '/photos_access.js');
  $args = module_invoke_all('photos_access');
  if (is_array($args)) {
    foreach ($args as $arg) {
      if ($arg) {
        $t = _photos_access_pass_type(arg(1));
        if (isset($t['view'])) {
          if ($t['view']->viewid == 3) {

            // $t['view']->pass <> $_SESSION[$t['view']->nid . '_' . session_id()]
            photos_access_pass_validate($t);
          }
        }
      }
    }
  }
}