how to get display name of Unvalidated users..?


Help me please.. I want to show the unvalidated users in the login page... I tried so many combinations but in vail..

Please help me with a code for getting the dispaly name of unvalidated users...

thank you

  • If you want to show the unvalidated users on login page, you have to ignore the elgg access system. It is not advised. The better way is to create an SQL query to get the username / names from the db_users_entity table where last action / last login is 0.

  • col == enabled

    elgg user validation status
        $access_status = access_get_show_hidden_status();
        . . .
        $user_entity->validated == true | false
        . . .


  • Dhrup, does this not only work for checking a single user?

    The simpleusermanagement plugin does it this way:

    $access_status = access_get_show_hidden_status();
    $data = get_data("SELECT e.* FROM {$CONFIG->dbprefix}entities e join {$CONFIG->dbprefix}users_entity u on e.guid=u.guid WHERE e.enabled='no' ORDER BY e.time_created 'desc'", "entity_row_to_elggstar");

    Then you could continue for example with a for-loop using $data to list the unvalidated members.

  • true -> only for single user.. 
    a simple query := 
    select username, name from users_entity entities where entities.enabled = false
    join.. etc
    limit 9999; 
    ... shud work; 
    get_data does not pay regard to access hidden -
    which only applies when calling entity funcns.

  • Hm. At least it works with get_data in Elgg 1.7. :)

  • iionly : get_data() is just the SQL query. You dont need the access wrapper for it. But if you are converting the data to elgg entities (by using the entity_row_to_elggstar() function) then only you need the access wrappers.

  • thank you all I am trying this and making a contrigger to delete the unvalidated users older than one month...

    Thank you very much

Feedback and Planning

Feedback and Planning

Discussions about the past, present, and future of Elgg and this community site.