fixed dmails
This commit is contained in:
parent
730d4d77c5
commit
734c9a2e59
@ -73,7 +73,6 @@ class DmailController extends ApplicationController
|
||||
|
||||
public function markAllRead()
|
||||
{
|
||||
vpe('a');
|
||||
if ($this->params()->commit == "Yes") {
|
||||
foreach (Dmail::where("to_id = ? and has_seen = false", $this->current_user->id)->take() as $dmail)
|
||||
$dmail->updateAttribute('has_seen', true);
|
||||
|
@ -71,14 +71,14 @@ class Dmail extends Rails\ActiveRecord\Base
|
||||
}
|
||||
}
|
||||
|
||||
protected function setToName($name)
|
||||
public function setToName($name)
|
||||
{
|
||||
if (!$user = User::where(['name' => $name])->first())
|
||||
return;
|
||||
$this->to_id = $user->id;
|
||||
}
|
||||
|
||||
protected function setFromName($name)
|
||||
public function setFromName($name)
|
||||
{
|
||||
if (!$user = User::where(['name' => $name])->first())
|
||||
return;
|
||||
|
Reference in New Issue
Block a user