public function register($input)
    {
        $account = $this->model()->fill($input);

        $account->password_confirmation = array_get($input, 'password_confirmation');

        // Generate a random confirmation code
        $account->confirmation_code = md5(uniqid(mt_rand(), true));

        // Save if valid. Password field will be hashed before save
        return $this->save($account);
    }