Hi,

I am using LDAP with AD. I have signed in as user using only username and password as it is in AD. After that osticket created me as registered user but with no e-mail. In e-mail field stands '@localhost'. Then I have tried to change this to my standard email but I am getting HTTP 500 internal server error. Mail address can't be changed as user or as agent (same error).
After attempt of changing mail, in error _log file is appended:

PHP Warning: Creating default object from empty value in /opt/osticket/upload/include/class.user.php on line 578, referer: http://IP_ADDRESS/profile.php
PHP Fatal error: Uncaught Error: Call to a member function save() on null in /opt/osticket/upload/include/class.user.php:579\nStack trace:\n#0 /opt/osticket/upload/profile.php(35): User->updateInfo(Array, Array)\n#1 {main}\n thrown in /opt/osticket/upload/include/class.user.php on line 579, referer: http://IP_ADDRESS/profile.php

Here is my configuration:

Does your account have an email address in AD?

5 days later

I can't believe i didn't check this.
After adding e-mail in AD I still couldn't change e-mail in osTicket. I had to delete user and sign in again. Still I could not sign in with e-mail. I have signed in with username again and then E-mail field was changed to my real e-mail.
Problem is that still i can't login with my e-mail. I am getting "Access denied" message, but with username is everything ok.
Another thing is that I should not delete user anymore because I have very important ticket created as a user.

Do you have any idea what is happening?

[EDIT] For regular users that are not from AD, mail can be changed without problem.

a year later

I realize that this is an old post, but just in case it would still be useful to someone. I have experienced the exact same error in similar conditions and after I patched a file the problem was solved.

In the file include/class.user.php, line 597 I changed this:

$this->default_email->address = $email->getClean();
$this->default_email->save();

into this:

if(!$this->default_email){
    $this->default_email = UserEmail::ensure($email->getClean());
    $this->emails->add($this->default_email);
}
else {
    $this->default_email->address = $email->getClean();
    $this->default_email->save();
}

My version is osTicket (v1.14.1).

Write a Reply...