- public function executeValidateUser(sfWebRequest $request){
- $username = $request -> getParameter("username");
- $password = $request -> getParameter("password");
- $query = Doctrine_Query::create()
- ->select("id")
- ->from("user")
- ->where("username=$username")
- ->andWhere("password=$password");
- $rowcount= $query -> count();
- if( $rowcount == 1 ){
- //do something useful, User Authenticated
- }
- else{
- // do something useful here too even thoug User is Not Authenticated :)
- }
- }
No comments:
Post a Comment