This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| define cart_id => var(cart_id) || $cart_id := lasso_uniqueid | |
| define current_cart => var(current_cart) || $current_cart := cart->oncreate('id' = cart_id) | |
| define cart => type { | |
| parent activerow | |
| public ds => ds(::example.carts) | |
| public created_column => 'created' | |
| public modified_column => 'modified' | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| define set_user_password(user::string,password::string) => { | |
| #password = security_registry->encodePassword('Lasso Security',#user,#password) | |
| inline( | |
| -database = 'security_auth_registry', | |
| -sql = 'UPDATE users SET password_ha1 = "'+#password->encodesql+'" | |
| WHERE name = "'+#user->encodesql+ '" ' | |
| ) => {} | |
| } | |
| // Usage: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protect => {inline} | |
| define keycolumn_value() => { | |
| local(c = column(keycolumn_name)) | |
| void != #c? return #c | |
| local(curMap = inline_scopeGet) | |
| #curMap && #curMap->size > 0 ? #c = #curMap->find(::currentinline)->dsInfo->forcedRowID | |
| #c->isa(::integer) && #c < 0 ? #c = 2147483648 + (2147483648 + #c) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?lassoscript | |
| /* | |
| Description: | |
| Restricts code from executing more frequently than the specified number of seconds. | |
| Returns the number of seconds to wait until blocks should be executed. | |
| Example: | |
| define my_thread => thread { |
NewerOlder