View/Edit #12:set_email_address _set_email_address

Switch to edit mode.

Name(s): set_email_address _set_email_address
1:  "set_email_address(email[, reason]) changes this.email_address to email and updates the registration database."
2:  if (!caller_perms().wizard)
3:    raise(E_PERM)
4:  endif
5:  {email, ?reason = ""} = args
6:  if (!is_clear_property(this, "email_address"))
7:    was_registered = $registration_db:delete(this.email_address)
8:    if (!was_registered)
9:      $wiz_utils:wiz_alert(tostr(this, ":set_email_address -- attempt to remove $registration_db entry for old address failed because it was not in the database!"))
10:   else
11:     "If others had that e-mail address, keep them in the database."
12:     if (who_else = setremove(was_registered, {this}))
13:       $registration_db:insert(this.email_address, who_else)
14:     endif
15:   endif
16: endif
17: if (reason)
18:   $registration_db:add(this, email, reason)
19: else
20:   $registration_db:add(this, email)
21: endif
22: this.email_address = email
23: "Last modified by Lao-Tzu (#8084) on Sat Oct 19 10:42:26 2002 MDT."

Verb arguments: this none this
Verb perms: Readable eXecutable NOT-Debug
Verb owned by: Slacker (#55)

You are not logged in.

[home | help | who | search | setup | code]