Permalink
Browse files

Some users don't have email addresses

  • Loading branch information...
1 parent 71c43ca commit f6e509519bd62516ff673ae4a30c18cbd899f85d @tru committed Apr 25, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/camper_van/user.rb
View
@@ -48,7 +48,12 @@ def admin?
def initialize(user)
@id = user.id
@name = user.name
- @account, @server = user.email_address.split("@")
+ if user.email_address
+ @account, @server = user.email_address.split("@")
+ else
+ @account = "noemail"
+ @server = "noserver"
+ end
@nick = irc_name user.name
@idle = false
@admin = user.admin

0 comments on commit f6e5095

Please sign in to comment.