summaryrefslogtreecommitdiff
path: root/src/user.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/user.cpp')
-rw-r--r--src/user.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/user.cpp b/src/user.cpp
index 649c40e..8f18706 100644
--- a/src/user.cpp
+++ b/src/user.cpp
@@ -81,6 +81,12 @@ bool user::check_login( std::string user, std::string password )
return true;
}
+void user::ini( content::user &c )
+{
+ master::ini( c );
+ c.captcha = ">> CAPTCHA <<";
+}
+
} // namespace apps
namespace content {
@@ -93,14 +99,18 @@ login_form::login_form( apps::strusCms &cms )
username.error_message( "The login is illegal" );
password.message( "Your password" );
password.error_message( "Your password is illegal" );
+ captcha.message( "Enter the correct captcha" );
+ captcha.error_message( "Captcha didn't match" );
submit.value( "Log in" );
add( username );
add( password );
+ add( captcha );
add( submit );
username.non_empty( );
password.non_empty( );
+ captcha.non_empty( );
}
bool login_form::validate( )