Make alt_login available in $user object
Architeck - November 3, 2009 - 20:49
| Project: | Alternate Login |
| Version: | 6.x-1.1 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
I have created a custom view for admins to search and filter users, however I cannot access to the users alt_login as a field for display or for use as a filter.
I think if the variable was available to the view the field and filter would become available automatically.
Basically looking to be able to use something like $user->alt_login; to access the users alt_login value.

#1
this has already been a part of the module for quite some time:
<?php/**
* Loads the user's alt_login to the user object.
*
* @param $user The user object.
*/
function _alt_login_load(&$user) {
if ($alt_login = db_result(db_query('SELECT alt_login FROM {alt_login} WHERE uid = %d', $user-> uid))) {
$user->alt_login = $alt_login;
}
}
?>
that function is invoked in hook_user, 'load' op, so you should already have access to $account->alt_login
#2
Thanks for that info, I must have overlooked that.
Is there a way to access $account->alt_login in the views UI so I can display or search users on the alt login value?
#3
no idea, thats sounds more like a general views question -- i'd take it up in the support forums.
#4
Automatically closed -- issue fixed for 2 weeks with no activity.