Phosphorum\Models\Users::beforeSave PHP Method

beforeSave() public method

public beforeSave ( )
    public function beforeSave()
    {
        if (!trim($this->name)) {
            if ($this->login) {
                $this->name = $this->login;
            } else {
                $this->name = 'No Name';
            }
        }
    }