mirror of
https://github.com/Mibew/java.git
synced 2025-01-22 17:40:35 +03:00
Fix bug with message about user rename
This commit is contained in:
parent
4102ce00f3
commit
3f39164db1
@ -847,6 +847,8 @@ Class Thread {
|
|||||||
public function renameUser($new_name) {
|
public function renameUser($new_name) {
|
||||||
// Rename only if a new name is realy new
|
// Rename only if a new name is realy new
|
||||||
if ($this->userName != $new_name) {
|
if ($this->userName != $new_name) {
|
||||||
|
// Save old name
|
||||||
|
$old_name = $this->userName;
|
||||||
// Rename user
|
// Rename user
|
||||||
$this->userName = $new_name;
|
$this->userName = $new_name;
|
||||||
$this->save();
|
$this->save();
|
||||||
@ -854,7 +856,7 @@ Class Thread {
|
|||||||
// Send message about renaming
|
// Send message about renaming
|
||||||
$message = getstring2_(
|
$message = getstring2_(
|
||||||
"chat.status.user.changedname",
|
"chat.status.user.changedname",
|
||||||
array($this->userName, $new_name),
|
array($old_name, $new_name),
|
||||||
$this->locale
|
$this->locale
|
||||||
);
|
);
|
||||||
$this->postMessage(self::KIND_EVENTS, $message);
|
$this->postMessage(self::KIND_EVENTS, $message);
|
||||||
|
Loading…
Reference in New Issue
Block a user