~tim-alwaysreformed/delete-inactive-jomsocial/main

« back to all changes in this revision

Viewing changes to deleteinactive-jomsocial.php

  • Committer: Tim Black
  • Date: 2010-08-23 19:25:33 UTC
  • Revision ID: tim@alwaysreformed.com-20100823192533-i0wkbbpd4gv5ua3c
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
// no direct access
 
3
defined( '_JEXEC' ) or die( 'Restricted access' );
 
4
 
 
5
// Import library dependencies
 
6
jimport('joomla.plugin.plugin');
 
7
 
 
8
class plgUserDeleteinactive_jomsocial extends JPlugin
 
9
{
 
10
   /**
 
11
    * Constructor
 
12
    *
 
13
    * For php4 compatability we must not use the __constructor as a constructor for
 
14
    * plugins because func_get_args ( void ) returns a copy of all passed arguments
 
15
    * NOT references.  This causes problems with cross-referencing necessary for the
 
16
    * observer design pattern.
 
17
    */
 
18
    function plgUserDeleteinactive_jomsocial( &$subject )
 
19
    {
 
20
            parent::__construct( $subject );
 
21
 
 
22
            // load plugin parameters
 
23
            $this->_plugin = JPluginHelper::getPlugin( 'user', 'deleteinactive-jomsocial' );
 
24
            $this->_params = new JParameter( $this->_plugin->params );
 
25
    }
 
26
 
 
27
    /**
 
28
    * Plugin method with the same name as the event will be called automatically.
 
29
    */
 
30
    function onLoginUser($user, $options)
 
31
    {
 
32
        global $mainframe;
 
33
        // TODO: use $user['username'] to find out if this user is an administrator 
 
34
        // TODO: Only execute if the currently viewing user is an administrator
 
35
        
 
36
 
 
37
        return true;
 
38
    }
 
39
 
 
40
}
 
41
?>
 
42