Software / code / prosody
Comparison
plugins/mod_register.lua @ 2877:1edeb8fe7d14
Merge 0.6.2/waqas with 0.6.2/MattJ
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Wed, 03 Mar 2010 22:05:05 +0000 |
| parent | 2831:8ee7ec6fc5fc |
| child | 2923:b7049746bd29 |
comparison
equal
deleted
inserted
replaced
| 2813:46dfcc33ea9e | 2877:1edeb8fe7d14 |
|---|---|
| 139 end | 139 end |
| 140 -- FIXME shouldn't use table.concat | 140 -- FIXME shouldn't use table.concat |
| 141 username = nodeprep(table.concat(username)); | 141 username = nodeprep(table.concat(username)); |
| 142 password = table.concat(password); | 142 password = table.concat(password); |
| 143 local host = module.host; | 143 local host = module.host; |
| 144 if not username then | 144 if not username or username == "" then |
| 145 session.send(st.error_reply(stanza, "modify", "not-acceptable", "The requested username is invalid.")); | 145 session.send(st.error_reply(stanza, "modify", "not-acceptable", "The requested username is invalid.")); |
| 146 elseif usermanager_user_exists(username, host) then | 146 elseif usermanager_user_exists(username, host) then |
| 147 session.send(st.error_reply(stanza, "cancel", "conflict", "The requested username already exists.")); | 147 session.send(st.error_reply(stanza, "cancel", "conflict", "The requested username already exists.")); |
| 148 else | 148 else |
| 149 if usermanager_create_user(username, password, host) then | 149 if usermanager_create_user(username, password, host) then |