Example #1
0
function users_settings_save($hook, $type, $return, $params)
{
    elgg_set_user_language();
    //elgg_set_user_password();
    set_user_password();
    elgg_set_user_default_access();
    elgg_set_user_name();
    elgg_set_user_email();
}
Example #2
0
 $pass = true;
 while (strlen($form_username) > $i) {
     if (stristr($alphabet, $form_username[$i]) === false) {
         $pass = false;
         break;
     }
     $i++;
 }
 if (!$pass) {
     print_header($pgv_lang['user_admin']);
     echo '<span class="error">', $pgv_lang['invalid_username'], '</span><br />';
 } else {
     // Change password
     if (!empty($form_pass1)) {
         AddToLog('User changed password');
         set_user_password(PGV_USER_ID, crypt($form_pass1));
     }
     $old_firstname = get_user_setting(PGV_USER_ID, 'firstname');
     $old_lastname = get_user_setting(PGV_USER_ID, 'lastname');
     $old_email = get_user_setting(PGV_USER_ID, 'email');
     // Change other settings
     set_user_setting(PGV_USER_ID, 'firstname', $form_firstname);
     set_user_setting(PGV_USER_ID, 'lastname', $form_lastname);
     set_user_setting(PGV_USER_ID, 'email', $form_email);
     set_user_setting(PGV_USER_ID, 'theme', $form_theme);
     set_user_setting(PGV_USER_ID, 'language', $form_language);
     set_user_setting(PGV_USER_ID, 'contactmethod', $form_contact_method);
     set_user_setting(PGV_USER_ID, 'visibleonline', $form_visible_online);
     set_user_setting(PGV_USER_ID, 'defaulttab', $form_default_tab);
     set_user_gedcom_setting(PGV_USER_ID, PGV_GED_ID, 'rootid', $form_rootid);
     // update gedcom record with new email address