[geeklog-cvs] geeklog: Admin User Editor password fields will now not be displ...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sat Mar 12 09:20:48 EST 2011
changeset 8150:579663fdbe7a
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/579663fdbe7a
user: Tom <websitemaster at cogeco.net>
date: Sat Mar 12 09:20:10 2011 -0500
description:
Admin User Editor password fields will now not be displayed for remote services.
diffstat:
public_html/admin/user.php | 27 ++++++++--
public_html/layout/professional/admin/user/edituser.thtml | 9 +---
public_html/layout/professional/admin/user/password.thtml | 8 +++
public_html/layout/professional_css/admin/user/edituser.thtml | 6 +--
public_html/layout/professional_css/admin/user/password.thtml | 5 ++
5 files changed, 36 insertions(+), 19 deletions(-)
diffs (121 lines):
diff -r 70907d377b14 -r 579663fdbe7a public_html/admin/user.php
--- a/public_html/admin/user.php Thu Mar 10 14:35:27 2011 -0500
+++ b/public_html/admin/user.php Sat Mar 12 09:20:10 2011 -0500
@@ -137,7 +137,8 @@
$retval .= SEC_getTokenExpiryNotice($token);
$user_templates = new Template($_CONF['path_layout'] . 'admin/user');
- $user_templates->set_file (array ('form' => 'edituser.thtml',
+ $user_templates->set_file (array ('form' => 'edituser.thtml',
+ 'password' => 'password.thtml',
'groupedit' => 'groupedit.thtml'));
$user_templates->set_var('xhtml', XHTML);
$user_templates->set_var('site_url', $_CONF['site_url']);
@@ -178,8 +179,7 @@
}
$remoteservice = '';
- if ($_CONF['show_servicename'] && ($_CONF['user_login_method']['3rdparty']
- || $_CONF['user_login_method']['openid'])) {
+ if ($_CONF['show_servicename']) {
if (! empty($A['remoteservice'])) {
$remoteservice = '@' . $A['remoteservice'];
}
@@ -210,8 +210,15 @@
} else {
$user_templates->set_var ('user_fullname', '');
}
- $user_templates->set_var('lang_password', $LANG28[5]);
- $user_templates->set_var('lang_password_conf', $LANG28[39]);
+
+ if ($A['remoteservice'] == '') {
+ $user_templates->set_var('lang_password', $LANG28[5]);
+ $user_templates->set_var('lang_password_conf', $LANG28[39]);
+ $user_templates->parse ('password_option', 'password', true);
+ } else {
+ $user_templates->set_var ('password_option', '');
+ }
+
$user_templates->set_var('lang_emailaddress', $LANG28[7]);
if (isset ($A['email'])) {
$user_templates->set_var('user_email', htmlspecialchars($A['email']));
@@ -466,6 +473,12 @@
COM_errorLog("**** entering saveusers****", 1);
COM_errorLog("group size at beginning = " . count($groups), 1);
}
+
+ // If remote service then assume blank password
+ if ($A['remoteservice'] != '') {
+ $passwd = '';
+ $passwd_conf = '';
+ }
if ($passwd != $passwd_conf) { // passwords don't match
return edituser($uid, 67);
@@ -548,7 +561,9 @@
if (empty ($uid) || !empty ($passwd)) {
$passwd = SEC_encryptPassword($passwd);
} else {
- $passwd = DB_getItem ($_TABLES['users'], 'passwd', "uid = $uid");
+ if ($A['remoteservice'] != '') {
+ $passwd = DB_getItem ($_TABLES['users'], 'passwd', "uid = $uid");
+ }
}
if (empty ($uid)) {
diff -r 70907d377b14 -r 579663fdbe7a public_html/layout/professional/admin/user/edituser.thtml
--- a/public_html/layout/professional/admin/user/edituser.thtml Thu Mar 10 14:35:27 2011 -0500
+++ b/public_html/layout/professional/admin/user/edituser.thtml Sat Mar 12 09:20:10 2011 -0500
@@ -25,14 +25,7 @@
<td class="alignright">{lang_fullname}:</td>
<td><input type="text" size="48" maxlength="80" name="fullname" value="{user_fullname}"{xhtml}></td>
</tr>
- <tr>
- <td class="alignright">{lang_password}:</td>
- <td><input type="password" size="16" name="passwd" value=""{xhtml}></td>
- </tr>
- <tr>
- <td class="alignright">{lang_password_conf}:</td>
- <td><input type="password" size="16" name="passwd_conf" value=""{xhtml}></td>
- </tr>
+ {password_option}
<tr>
<td class="alignright">{lang_emailaddress}:</td>
<td><input type="text" size="48" maxlength="255" name="email" value="{user_email}"{xhtml}></td>
diff -r 70907d377b14 -r 579663fdbe7a public_html/layout/professional/admin/user/password.thtml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/public_html/layout/professional/admin/user/password.thtml Sat Mar 12 09:20:10 2011 -0500
@@ -0,0 +1,8 @@
+ <tr>
+ <td class="alignright">{lang_password}:</td>
+ <td><input type="password" size="16" name="passwd" value=""{xhtml}></td>
+ </tr>
+ <tr>
+ <td class="alignright">{lang_password_conf}:</td>
+ <td><input type="password" size="16" name="passwd_conf" value=""{xhtml}></td>
+ </tr>
diff -r 70907d377b14 -r 579663fdbe7a public_html/layout/professional_css/admin/user/edituser.thtml
--- a/public_html/layout/professional_css/admin/user/edituser.thtml Thu Mar 10 14:35:27 2011 -0500
+++ b/public_html/layout/professional_css/admin/user/edituser.thtml Sat Mar 12 09:20:10 2011 -0500
@@ -24,11 +24,7 @@
<dt><label for="admin-edituser-fullname">{lang_fullname}</label></dt>
<dd><input type="text" size="48" maxlength="80" value="{user_fullname}" name="fullname" id="admin-edituser-fullname" class="text"{xhtml}></dd>
- <dt><label for="admin-edituser-passwd">{lang_password}</label></dt>
- <dd><input type="password" size="16" value="" name="passwd" id="admin-edituser-passwd" class="text"{xhtml}></dd>
-
- <dt><label for="admin-edituser-passwd_conf">{lang_password_conf}</label></dt>
- <dd><input type="password" size="16" value="" name="passwd_conf" id="admin-edituser-passwd_conf" class="text"{xhtml}></dd>
+ {password_option}
<dt><label for="v-email">{lang_emailaddress}</label></dt>
<dd><input type="text" size="48" maxlength="255" value="{user_email}" name="email" id="admin-edituser-email" class="text"{xhtml}></dd>
diff -r 70907d377b14 -r 579663fdbe7a public_html/layout/professional_css/admin/user/password.thtml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/public_html/layout/professional_css/admin/user/password.thtml Sat Mar 12 09:20:10 2011 -0500
@@ -0,0 +1,5 @@
+ <dt><label for="admin-edituser-passwd">{lang_password}</label></dt>
+ <dd><input type="password" size="16" value="" name="passwd" id="admin-edituser-passwd" class="text"{xhtml}></dd>
+
+ <dt><label for="admin-edituser-passwd_conf">{lang_password_conf}</label></dt>
+ <dd><input type="password" size="16" value="" name="passwd_conf" id="admin-edituser-passwd_conf" class="text"{xhtml}></dd>
More information about the geeklog-cvs
mailing list