I have a plugin that for any reason turn off alone

The plugin purpose is force to complete some fields on first login. Basically I have:

- the start.php file with a couple of functions to check fields empty on login

- the language.php file .

I have an Elgg version : Release - 1.8.0.1, Version - 2011061200

in a production site. In my DEV site this not happening.

I were viewing the elgg core code and the only point that I could see something like that is in the plugin list.  

If someone have any idea about to check this, please let me know

Thanks Daniel

  • This is the code of START.PHP file

     

    <?php

    register_elgg_event_handler('init','system','firstlogin_init');

     

    function firstlogin_profileupdate($event, $object_type, $object) {

    if($event == 'profileupdate' && $object_type=='user' && $object instanceof ElggUser) {

    if (!firstlogin_fields_complete($object)) {

    register_error(elgg_echo('firstlogin:fields:incomplete'));

    forward($object->getURL() ."/edit");

    }

    }

     

    return true;

    }

     

    function firstlogin_login($event, $object_type, $object) {

    if($event == 'login' && $object_type=='user' && $object instanceof ElggUser) {

    if (!firstlogin_fields_complete($object)) {

    register_error(elgg_echo('firstlogin:fields:incomplete'));

    forward($object->getURL() ."/edit");

    }

    }

     

    return true;

    }

     

    function firstlogin_fields_complete($object) {

    if (

    ($object->name == "")

    || ($object->profile_1 == "")

    || ($object->profile_2 == "")

    || ($object->profile_3 == "")

    || ($object->profile_5 == "")

    ) {

    return false;

    }

     

    return true;

    }

     

    function firstlogin_init() {

    register_elgg_event_handler('login', 'user', 'firstlogin_login');

    register_elgg_event_handler('profileupdate', 'user', 'firstlogin_profileupdate');

    }

  • I don't understand the problem. Are you saying you can't deactivate the plugin from the admin area?

  • Hi brett!! No, this plugin for any is turn off alone... noone hit in the Deactivate button on admin panel.

  • It's like someone rename the plugin folder and then set the original name. If I do this obtain the same results.