The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(287) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/printthread.php(287) : eval()'d code 2 errorHandler->error
/printthread.php 287 eval
/printthread.php 117 printthread_multipage



UserSpice
My user_settings.php - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23)
+--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26)
+--- Thread: My user_settings.php (/showthread.php?tid=837)

Pages: 1 2


My user_settings.php - shoropio - 11-19-2017

Hello again, in my user_settings.php I have three additional fields, which are phone number, address and company. I can not add the verification or the success or error message. I already have the form ready and I have the three respective tables for those fields but I do not manage to record this data in my db, I had this resolved in 4.2 but in 4.3.4 it is hitting me hard in the head. maybe you can help me


My user_settings.php - shoropio - 11-19-2017

Sorry I already solved it

<pre>
Code:
//Update address
        if ($userdetails->address != $_POST['address']){
            $address = ucfirst(Input::get("address"));
            $fields=array('address'=>$address);
            $validation->check($_POST,array(
                'address' => array(
                    'display' => 'address',
                    'required' => true,
                    'min' => 1,
                    'max' => 255
                )
            ));
            if($validation->passed()){
                $db->update('users',$userId,$fields);
                $successes[]='Address updated.';
                                logger($user->data()->id,"User","Changed address from $userdetails->address to $address.");
            }else{
                //validation did not pass
                foreach ($validation->errors() as $error) {
                    $errors[] = $error;
                }
            }
        }else{
            $address=$userdetails->address;
        }
</pre>



My user_settings.php - Brandin - 11-19-2017

You may want to take the ucfirst( off of your variable, that is used for fname and lname to ensure they are cased properly. Instead just have $address = Input::get("address");


My user_settings.php - shoropio - 11-19-2017

Brandin... you're a genius. Greetings....

This line
Code:
<?= $settings->site_name . (($pageTitle != '') ? ' - '.$pageTitle : ''); ?>
shows the name of the site and is separated by a - the name of the page. as it would in reverse, name of the page - name of the site. I failed and I died trying.


My user_settings.php - Brandin - 11-19-2017

I didn't write the code for this portion and I'm unable to work on it at this time. I'll see what I can come up with for you over the next few days unless someone else does in the meantime.


My user_settings.php - shoropio - 11-19-2017

In the same way, thank you very much.


My user_settings.php - mudmin - 11-19-2017

I'm having a hard time understanding where you're stuck? Can you let me know and then paste your entire file to pastebin and share the link here?



My user_settings.php - shoropio - 11-20-2017

Hello this line
Code:
<? = $ Settings-> site_name. (($ PageTitle! = '')? '-'. $ PageTitle: '');?>
It shows me the name of the site and then the name of the page.Y I want the name of the page first and then the name of the site.


My user_settings.php - dan - 11-20-2017

Ohh. I can fix this tomorrow. I will take care of it.

-Mudmin



My user_settings.php - shoropio - 11-20-2017

Thank you very much mudmin!