acs_user::get_user_info_not_cached (private)

 acs_user::get_user_info_not_cached -user_id user_id

Defined in packages/acs-tcl/tcl/community-core-procs.tcl

Extracts user information. Differently from acs_user::get this proc won't return generic party information.

Switches:
-user_id (required)
Returns:
a dict

Partial Call Graph (max 5 caller/called nodes):
%3 acs_user::get_user_info acs_user::get_user_info (public) acs_user::get_user_info_not_cached acs_user::get_user_info_not_cached acs_user::get_user_info->acs_user::get_user_info_not_cached acs_magic_object acs_magic_object (public) acs_user::get_user_info_not_cached->acs_magic_object db_0or1row db_0or1row (public) acs_user::get_user_info_not_cached->db_0or1row

Testcases:
No testcase defined.
Source code:
    set registered_users_group_id [acs_magic_object "registered_users"]
    set user_p [db_0or1row user_info {
        select u.user_id,
               u.authority_id,
               u.username,
               u.screen_name,
               u.priv_name,
               u.priv_email,
               u.email_verified_p,
               u.email_bouncing_p,
               u.last_visit,
               to_char(last_visit, 'YYYY-MM-DD HH24:MI:SS') as last_visit_ansi,
               u.second_to_last_visit,
               to_char(second_to_last_visit, 'YYYY-MM-DD HH24:MI:SS') as second_to_last_visit_ansi,
               u.n_sessions,
               u.password,
               u.salt,
               u.password_question,
               u.password_answer,
               u.password_changed_date,
               extract(day from current_timestamp - password_changed_date) as password_age_days,
               u.auth_token,
               mm.rel_id,
               case when (mr.member_state = 'approved') then 't' else 'f' end  as registered_user_p,
               mr.member_state
        from users u
             left join group_member_map mm on mm.member_id = u.user_id
                                          and mm.group_id  = mm.container_id
                                          and mm.group_id  = :registered_users_group_id
                                          and mm.rel_type  = 'membership_rel'
             left join membership_rels mr on mr.rel_id = mm.rel_id
        where u.user_id = :user_id
    } -column_array user]

    if {$user_p} {
        return [array get user]
    } else {
        return [list]
    }
Generic XQL file:
packages/acs-tcl/tcl/community-core-procs.xql

PostgreSQL XQL file:
packages/acs-tcl/tcl/community-core-procs-postgresql.xql

Oracle XQL file:
packages/acs-tcl/tcl/community-core-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: