Traq\Models\User::beforeCreate PHP Method

beforeCreate() protected method

Set defaults before creating user.
protected beforeCreate ( )
    protected function beforeCreate()
    {
        $this->name = $this->name ?: $this->username;
        $this->session_hash = sha1($this->username . uniqid() . microtime() . rand(0, 99999));
    }