Scribd.Net.User.SignUp

Signs a user up with a Scribd account

Signature(s)

  • public bool SignUp(string userName, string password, string email, string name)

Parameter(s)

  • string userName : The user name to assign to the user.
  • string password : The password assigned to the user.
  • string email : The user's email address.
  • string name : The user's real name.

Return Value

  • bool true on success, false on failure.

Usage Example

// Sign up my user.
public void SignupMyUser()
{
	// Subscribe to sign up events.
	Scribd.Net.User.BeforeSignUp += new EventHandler<UserEventArgs>(User_BeforeSignUp);
	Scribd.Net.User.AfterSignUp += new EventHandler<UserEventArgs>(User_AfterSignUp);

	// Try and sign up.
	bool signedUp = Scribd.Net.User.Signup("myUserName", "myPassword", "my@email.com", "Mr. Me");

	if (signedUp)
	{
		// Success!
	}
}

// Happens before the sign up is attempted.
void User_BeforeSignUp(object sender, UserEventArgs e)
{
	// I can cancel this thing right here and now!
	// e.Cancel = true;
}

// Happens after a sign up is called.
void User_AfterSignUp(object sender, UserEventArgs e)
{
	if (e.Success)
	{
		// Get my new user!
		Scribd.Net.User newUser = e.User;
	}
	else
	{
		// Something went awry.
	}
}


Release
  • Cannot resolve release macro, invalid id.
  • Cannot resolve release macro, invalid id. significant changes
See Also

Last edited Mar 12, 2008 at 5:49 PM by JPaulDuncan, version 1

Comments

No comments yet.