/**
  * @return \yii\db\ActiveQuery
  */
 public function getCustomerUserName()
 {
     return $this->hasOne(UserLogin::className(), ['user_name' => 'customer_user_name']);
 }
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getDesignerUserName()
 {
     return $this->hasOne(UserLogin::className(), ['user_name' => 'designer_user_name']);
 }
 public function actionEditpassword()
 {
     $db = Yii::$app->db;
     //	$model1 = new Customer();
     /* 	if ($model1->load(Yii::$app->request->post()))
        	{
        		$name = $model1->customer_password;//
        		$db->createCommand('UPDATE Customer set customer_password="******" WHERE customer_user_name ="greg chappel"')->execute();
        		echo $name;
        			
        	} */
     $oldpassword = $_POST['oldp'];
     $model = UserLogin::find()->where(['user_name' => 'greg chappel', 'user_password' => $oldpassword])->one();
     if ($model == null) {
         echo "Password Incorrect";
     } else {
         if ($_POST['newp'] != $_POST['retp']) {
             echo "Password Mismatch";
         } else {
             $db->createCommand('UPDATE user_login set user_password="******" WHERE user_name ="greg chappel"')->execute();
             echo 'success';
         }
     }
 }