Display Realname instead of login at "Switch user" for admins through module login_box
- Status
- Closed
- Subject
- Display Realname instead of login at "Switch user" for admins through module login_box
- Version
- 12.x
15.x - Category
- Usability
- Feature request
- Less than 30-minutes fix
- Support request
- Feature
- External Authentication (LDAP, AD, PAM, CAS, etc)
Realname
User Administration (Registration, Login & Banning) - Resolution status
- Fixed or Solved
- Submitted by
- Xavier de Pedro
- Volunteered to solve
- Jonny Bradley
- Lastmod by
- Xavier de Pedro
- Rating
- Related-to
- Description
Use case: LDAP setups with numeric ID's for usernames: the admin needs to be able to switch to some user's account to check that settings and perms are as expected for that usergroup, etc. I know the co-worker names, but I don't know their ID's in the setup, other than manually checking at the users list and infer it's name from their email.
This line seems to control it at the template for the login box module:
Copy to clipboard{autocomplete element="#login-switchuser_"|cat:$module_logo_instance type="username"}
which implies that there is a function.autocomplete.php smarty_tiki file.I managed to make the userrealname display in the dropdown box. But I need that userrealname as label, while keeping the username as option to be used internally (otherwise the switch user does not work, as far as I could see)
1st attempt:
-------
I tried with this type of syntax, but it didnt' work:Copy to clipboard{autocomplete element="#login-switchuser_"|cat:$module_logo_instance type="userrealname" options="label:userrealname,value:username"}
since that is what I understood from here:
http://api.jqueryui.com/autocomplete/#option-source
2nd attempt:-------
I also tried modifying function.autocomplete.php and the
mod-login_box.tpl to end up producing this syntax (as I could see in the
html source of the produced page):Copy to clipboard$("#login-switchuser_2").tiki("autocomplete", "userrealname", { source:[label:"userrealname",value:"username"] });
but it didnt' work either.
Any tips on how to write it in the proper jquery and smarty syntax?- Solution
r58237
?
Fix confirmed, thsk jonnyb!- Importance
- 4
- Easy to solve?
- 6
- Priority
- 24
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 5771
- Created
- Thursday 10 December, 2015 09:45:03 UTC
by Xavier de Pedro - LastModif
- Friday 08 April, 2016 11:46:59 UTC