hide password field

16 years 6 months ago #47963 by trusca
hide password field was created by trusca
Hello,

I want to hide password field in user profile... can you help me?

Thanks!!

Trusca.

Please Log in to join the conversation.

16 years 6 months ago #47969 by nant
Replied by nant on topic Re:hide password field
Moved to feature requests forum (was initially posted in bugs area!)

Please Log in to join the conversation.

16 years 4 months ago #51882 by joshua.lyon
Replied by joshua.lyon on topic Re:hide password field
What's the status of this?

---
Josh

Please Log in to join the conversation.

16 years 4 months ago #51888 by joshua.lyon
Replied by joshua.lyon on topic Re:hide password field
You can simply comment out the lines of code that generate the password field rows from the core plugin:
/components/com_comprofiler/plugin/user/plug_cbcore/cb_core.php

Lines 223 to 232 in CB 1.1:
[code:1] /*
$return .= "<tr>\n";
$return .= " <td class=\"titleCell\">"._UE_PASS.":</td>\n";
$return .= " <td class=\"fieldCell\"><input class=\"inputbox\" type=\"password\" size=\"40\" id=\"password\" name=\"password\" value=\"\" autocomplete=\"off\" />";
$return .= getFieldIcons($ui, false, false, sprintf( _VALID_AZ09, _UE_PASS, 6 ), _UE_PASS.":"«»);
$return .= "</td>\n</tr>\n";
$return .= "<tr>\n";
$return .= " <td class=\"titleCell\">"._UE_VPASS.":</td>\n";
$return .= " <td class=\"fieldCell\"><input class=\"inputbox\" type=\"password\" size=\"40\" id=\"verifyPass\" name=\"verifyPass\" autocomplete=\"off\" />";
$return .= getFieldIcons($ui, false, false);
$return .= "</td>\n</tr>\n";
*/[/code:1]

I haven't seen any side-effects of this. Hopefully in future versions this is a simple radio option in the backend.

---
Josh

Please Log in to join the conversation.

16 years 4 months ago #51892 by joshua.lyon
Replied by joshua.lyon on topic Disable / Hide Password Field / Option
I should note that simply commenting out the lines will throw off a function though - if you have a debugger like Firebug enabled you will notice the following error:
me.password has no properties
<<joomla>>/component/option,com_comprofiler/Itemid,11/task,userDetails/
Line 243

A better way of handling this would be to hide the table rows with CSS - eg add a class with a property of display: none;
[code:1] // JL Hack
//Password
$return .= "<tr class='hideme'>\n";
$return .= " <td class=\"titleCell\">"._UE_PASS.":</td>\n";
$return .= " <td class=\"fieldCell\"><input class=\"inputbox\" type=\"password\" size=\"40\" id=\"password\" name=\"password\" value=\"\" autocomplete=\"off\" />";
$return .= getFieldIcons($ui, false, false, sprintf( _VALID_AZ09, _UE_PASS, 6 ), _UE_PASS.":"«»);
$return .= "</td>\n</tr>\n";
//Verify password
$return .= "<tr class='hideme'>\n";
$return .= " <td class=\"titleCell\">"._UE_VPASS.":</td>\n";
$return .= " <td class=\"fieldCell\"><input class=\"inputbox\" type=\"password\" size=\"40\" id=\"verifyPass\" name=\"verifyPass\" autocomplete=\"off\" />";
$return .= getFieldIcons($ui, false, false);
$return .= "</td>\n</tr>\n";
//[/code:1]
And in your template's CSS you would add:
[code:1].hideme {
display:none;
}[/code:1]

This could also be done by adding style="display:none;" to the tr's instead of the class and style sheet addition.

Post edited by: joshua.lyon, at: 2007/12/06 18:28

---
Josh

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.455 seconds

Facebook Twitter LinkedIn