Changeset 1229
- Timestamp:
- 02/23/10 17:16:09 (3 years ago)
- Location:
- branches/1.2/content/plugins/users
- Files:
-
- 6 edited
-
languages/users_language.php (modified) (1 diff)
-
libs/UserFunctions.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
templates/users_account.php (modified) (2 diffs)
-
templates/users_tabs.php (modified) (1 diff)
-
users.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2/content/plugins/users/languages/users_language.php
r1182 r1229 64 64 $lang["users_account_deleted"] = "User Deleted"; 65 65 $lang["users_account_admin_admin"] = "Sorry, only admins can access admin accounts."; 66 $lang["users_account_username_requirements"] = "At least 4 characters, using only letters, dashes and underscores"; 67 $lang["users_account_password_requirements"] = "At least 8 characters, using only letters, numbers and these symbols: ! @ * # - _"; 66 68 // Other language is used in content/language_packs/language_default/admin_language 67 69 -
branches/1.2/content/plugins/users/libs/UserFunctions.php
r1202 r1229 124 124 $headers = "From: " . SITE_EMAIL . "\r\nReply-To: " . SITE_EMAIL . "\r\nX-Priority: 3\r\n"; 125 125 126 mail($to, $subject, $body, $headers);126 $h->email($to, $subject, $body, $headers); 127 127 } 128 128 -
branches/1.2/content/plugins/users/readme.txt
r1180 r1229 14 14 Changelog 15 15 --------- 16 v.1.3 2010/02/23 - Nick - Fix for profile refresh bug, mail sent through Email class, instructions added to Account update form. 16 17 v.1.2 2010/02/20 - Nick - Meta tags generated from user details and profile 17 18 v.1.1 2009/12/22 - Nick - Updated for compatibility with Hotaru 1.0 -
branches/1.2/content/plugins/users/templates/users_account.php
r980 r1229 38 38 <table> 39 39 <tr><td><?php echo $h->lang["users_account_username"]; ?> </td><td><input type='text' size=30 name='username' value='<?php echo $username; ?>' /></td></tr> 40 <tr><td colspan='2'><small><?php echo $h->lang["users_account_username_requirements"]; ?></small></td></tr> 40 41 <tr><td><?php echo $h->lang["users_account_email"]; ?> </td><td><input type='text' size=30 name='email' value='<?php echo $email_check; ?>' /></td></tr> 41 42 <?php … … 81 82 <form name='update_form' class='users_form' action='<?php echo BASEURL; ?>index.php' method='post'> 82 83 <table> 84 <tr><td colspan='2'><small><?php echo $h->lang["users_account_password_requirements"]; ?></small></td></tr> 83 85 <tr><td><?php echo $h->lang["users_account_old_password"]; ?> </td><td><input type='password' size=30 name='password_old' value='<?php echo $password_check_old; ?>' /></td></tr> 84 86 <tr><td><?php echo $h->lang["users_account_new_password"]; ?> </td><td><input type='password' size=30 name='password_new' value='<?php echo $password_check_new; ?>' /></td></tr> -
branches/1.2/content/plugins/users/templates/users_tabs.php
r1107 r1229 27 27 ?> 28 28 29 <ul class='user_tabs'>30 31 <li><?php echo $h->lang["users_edit"]; ?>32 <a href='<?php echo $h->url(array('user'=>$username)); ?>'><?php echo $username; ?></a>:33 </li>34 35 29 <?php // show account and profile links to owner or admin access users: 36 30 if (($h->currentUser->name == $username) || ($h->currentUser->getPermission('can_access_admin') == 'yes')) { ?> 31 32 <ul class='user_tabs'> 33 34 <li><?php echo $h->lang["users_edit"]; ?> 35 <a href='<?php echo $h->url(array('user'=>$username)); ?>'><?php echo $username; ?></a>: 36 </li> 37 37 38 <li><a href='<?php echo $h->url(array('page'=>'account', 'user'=>$username)); ?>'><?php echo $h->lang["users_account"]; ?></a></li> 38 39 <li><a href='<?php echo $h->url(array('page'=>'edit-profile', 'user'=>$username)); ?>'><?php echo $h->lang["users_profile"]; ?></a></li> 39 40 <li><a href='<?php echo $h->url(array('page'=>'user-settings', 'user'=>$username)); ?>'><?php echo $h->lang["users_settings"]; ?></a></li> 40 <?php } ?>41 41 42 <?php // show permissions and User Manager links admin access users only: 43 if ($h->currentUser->getPermission('can_access_admin') == 'yes') { ?> 44 <li><a href='<?php echo $h->url(array('page'=>'permissions', 'user'=>$username)); ?>'><?php echo $h->lang["users_permissions"]; ?></a></li> 45 46 <?php // show User Manager link only if theplugin is active 47 if ($h->isActive('user_manager')) { ?> 48 <li><a href="<?php echo BASEURL; ?>admin_index.php?search_value=<?php echo $username; ?>&plugin=user_manager&page=plugin_settings&type=search"><?php echo $h->lang['user_man_link']; ?></a></li> 42 <?php // show permissions and User Manager links admin access users only: 43 if ($h->currentUser->getPermission('can_access_admin') == 'yes') { ?> 44 <li><a href='<?php echo $h->url(array('page'=>'permissions', 'user'=>$username)); ?>'><?php echo $h->lang["users_permissions"]; ?></a></li> 45 46 <?php // show User Manager link only if theplugin is active 47 if ($h->isActive('user_manager')) { ?> 48 <li><a href="<?php echo BASEURL; ?>admin_index.php?search_value=<?php echo $username; ?>&plugin=user_manager&page=plugin_settings&type=search"><?php echo $h->lang['user_man_link']; ?></a></li> 49 <?php } ?> 50 49 51 <?php } ?> 50 52 53 </ul> 54 51 55 <?php } ?> 52 53 </ul>54 -
branches/1.2/content/plugins/users/users.php
r1189 r1229 3 3 * name: Users 4 4 * description: Provides profile, settings and permission pages 5 * version: 1. 25 * version: 1.3 6 6 * folder: users 7 7 * type: users … … 285 285 $h->vars['user']->saveProfileSettingsData($h, $profile, 'user_profile', $h->vars['user']->id); 286 286 287 /* Problem! The previous profile data is cached and we don't want to disable caching for profiles, 288 nor do we want to clear the entire db_cache, so instead, we'll delete the cache file that holds 289 the previous profile for this user. */ 290 $sql = "SELECT usermeta_value FROM " . DB_PREFIX . "usermeta WHERE usermeta_userid = %d AND usermeta_key = %s"; 291 $query = $h->db->prepare($sql, $h->vars['user']->id, 'user_profile'); 292 $cache_file = CACHE . 'db_cache/' . md5($query); 293 if (file_exists($cache_file)) { 294 unlink($cache_file); // delete cache file. 295 } 296 287 297 $h->message = $h->lang["users_profile_edit_saved"] . "<br />\n"; 288 298 $h->message .= "<a href='" . $h->url(array('user'=>$h->vars['user']->name)) . "'>"; … … 308 318 309 319 $h->vars['user']->saveProfileSettingsData($h, $settings, 'user_settings', $h->vars['user']->id); 320 321 /* Problem! The previous settings data is cached and we don't want to disable caching for settings, 322 nor do we want to clear the entire db_cache, so instead, we'll delete the cache file that holds 323 the previous settings for this user. */ 324 $sql = "SELECT usermeta_value FROM " . DB_PREFIX . "usermeta WHERE usermeta_userid = %d AND usermeta_key = %s"; 325 $query = $h->db->prepare($sql, $h->vars['user']->id, 'user_settings'); 326 $cache_file = CACHE . 'db_cache/' . md5($query); 327 if (file_exists($cache_file)) { 328 unlink($cache_file); // delete cache file. 329 } 310 330 311 331 $h->message = $h->lang["users_settings_saved"] . "<br />\n";
Note: See TracChangeset
for help on using the changeset viewer.