liquid_feedback_frontend
diff model/member.lua @ 5:afd9f769c7ae
Version beta1
Final voting with Schulze-Method is now possible
Many bug fixes and code cleanup
Registration with invite codes
More sort and filter options
Seperated display of "supporters" and "potential supporters"
Optical changes
Flood limit / initiative contigent is now checked by frontend
Neccessary changes to access core beta11
Final voting with Schulze-Method is now possible
Many bug fixes and code cleanup
Registration with invite codes
More sort and filter options
Seperated display of "supporters" and "potential supporters"
Optical changes
Flood limit / initiative contigent is now checked by frontend
Neccessary changes to access core beta11
author | bsw/jbe |
---|---|
date | Fri Dec 25 12:00:00 2009 +0100 (2009-12-25) |
parents | 80c215dbf076 |
children | 8d91bccab0bf |
line diff
1.1 --- a/model/member.lua Thu Dec 10 12:00:00 2009 +0100 1.2 +++ b/model/member.lua Fri Dec 25 12:00:00 2009 +0100 1.3 @@ -245,7 +245,7 @@ 1.4 1.5 function Member:by_login_and_password(login, password) 1.6 local selector = self:new_selector() 1.7 - selector:add_where{'"login" = ?', login, password } 1.8 + selector:add_where{'"login" = ?', login } 1.9 selector:add_where('"active"') 1.10 selector:optional_object_mode() 1.11 local member = selector:exec() 1.12 @@ -256,6 +256,20 @@ 1.13 end 1.14 end 1.15 1.16 +function Member:by_login(login) 1.17 + local selector = self:new_selector() 1.18 + selector:add_where{'"login" = ?', login } 1.19 + selector:optional_object_mode() 1.20 + return selector:exec() 1.21 +end 1.22 + 1.23 +function Member:by_name(name) 1.24 + local selector = self:new_selector() 1.25 + selector:add_where{'"name" = ?', name } 1.26 + selector:optional_object_mode() 1.27 + return selector:exec() 1.28 +end 1.29 + 1.30 function Member:get_search_selector(search_string) 1.31 return self:new_selector() 1.32 :add_field( {'"highlight"("member"."name", ?)', search_string }, "name_highlighted")